-
#include <iostream> using namespace std; int main() { int n,i,j,t=0; int a[30000],b[200]; cin>>n; for (i=1;i<=n;i++) { cin>>b[i]; a[b[i]]=1; } for (i=1;i<=n-1;i++) { for (j=i+1;j<=n;j++) if (a[(b[i]+b[j])]==1) { a[b[i]+b[j]]=0; t=t+1; } } cout<<t; return 0; }