Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define fo(n) for(int i=0;i<n;i++)
- #define fos(o,n) for(int i=o;i<=n;i++)
- int main(){
- int T;
- cin >> T;
- while( T-- ){
- int n , x[0x70];
- map<int,bool> mp;
- bool p = 0;
- cin >> n;
- fo( n ) cin >> x[i] , mp[x[i]] = 1;
- fo( n )
- for( int j = i + 1 ; j < n ; ++j )
- if( mp[x[i] + x[j]] ) p = 1;
- if( p ) puts( "false" );
- else puts( "true" );
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement