Submission #926144

# Submission time Handle Problem Language Result Execution time Memory
926144 2024-02-12T15:37:39 Z Zakir060 XOR Sum (info1cup17_xorsum) C++17
0 / 100
62 ms 131072 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
void xakir() {
int n;
cin>>n;
vector<int>v(n+1);
for(int i=1;i<=n;i++) {
cin>>v[i];
}
vector<int>pre((n+1)*(n+2));
for(int i=1;i<=n;i++) {
for(int j=i;j<=n;j++) {
pre.push_back(v[i]+v[j]);
}
}
int res=0;
for(int i=0;i<pre.size();i++) {
res^=(pre[i]);
}
cout<<res;
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cout.setf( ios::fixed);
cout.precision(4);
system("color 0A");
int t=1;
//cin>>t;
while(t--) {
xakir();
}
/**
    ░█████╗░░░░░░░░░░░░░░░
    ██╔══██╗░░██╗░░░░██╗░░
    ██║░░╚═╝██████╗██████╗
    ██║░░██╗╚═██╔═╝╚═██╔═╝
    ╚█████╔╝░░╚═╝░░░░╚═╝░░
    ░╚════╝░░░░░░░░░░░░░░░
**/

 }

Compilation message

xorsum.cpp: In function 'void xakir()':
xorsum.cpp:18:14: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 | for(int i=0;i<pre.size();i++) {
      |             ~^~~~~~~~~~~
xorsum.cpp: In function 'int main()':
xorsum.cpp:29:7: warning: ignoring return value of 'int system(const char*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   29 | system("color 0A");
      | ~~~~~~^~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Runtime error 39 ms 131072 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 62 ms 21060 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 62 ms 21060 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 39 ms 131072 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 39 ms 131072 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -