Submission #67685

#TimeUsernameProblemLanguageResultExecution timeMemory
67685tatatanXOR Sum (info1cup17_xorsum)C++11
0 / 100
1672 ms8244 KiB
#include <bits/stdc++.h> #define mp make_pair #define pb push_back #define pii pair<int,int> #define LL long long #define st first #define nd second #define endl '\n' using namespace std; const int MAXN=1000005; LL n,a[MAXN],b[MAXN]; LL ans; int main() { scanf("%lld",&n); for(int i=0;i<n;++i) scanf("%lld",&a[i]); int ans2=0; for(int i=0;i<n;++i) for(int j=0;j<n;++j) ans2^=a[i]+a[j]; printf("%lld/n",ans2); }

Compilation message (stderr)

xorsum.cpp: In function 'int main()':
xorsum.cpp:24:22: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int' [-Wformat=]
  printf("%lld/n",ans2);
                      ^
xorsum.cpp:17:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld",&n);
  ~~~~~^~~~~~~~~~~
xorsum.cpp:19:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld",&a[i]);
   ~~~~~^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...