Submission #959466

# Submission time Handle Problem Language Result Execution time Memory
959466 2024-04-08T09:00:54 Z ramalzaher XOR Sum (info1cup17_xorsum) C++14
0 / 100
1600 ms 12824 KB
#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update > ordered_set ;
#define int long long
#define F first
#define S second
#define rep(i , j , n ) for(int i = j ;i < n; i++ )
#define FOR(i , n ) rep(i ,0 , n )
#define sz size()
#define pb push_back
#define all(x) x.begin() , x.end()
#define vi vector<int>
#define yes cout<<"YES\n";
#define no cout<<"NO\n";
#define cans cout<<ans<<endl;
#define forx(i, x) for(auto &i : x)
#define fast
#define pii pair<int ,int >
#define endl "\n"
#define sp ' '
const int N = 300 ;
const int inf = 1e15 ;

main()
{
int n ; cin >> n ; int ans = 0 , a[n];forx(it , a )cin >> it ;
FOR(i, n ) {
FOR(j , n ) {
ans ^= (a[i]+a[j]) ;
}
}
cout<<ans<<endl;
}

Compilation message

xorsum.cpp:25:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   25 | main()
      | ^~~~
# Verdict Execution time Memory Grader output
1 Incorrect 8 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1650 ms 12824 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1650 ms 12824 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 8 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 8 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -