Submission #1099434

# Submission time Handle Problem Language Result Execution time Memory
1099434 2024-10-11T09:56:55 Z vjudge1 XORanges (eJOI19_xoranges) C++17
0 / 100
1000 ms 1884 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long



signed main()
{
   int n, q; cin >> n >> q;
   vector<int> a(n + 1);
   for (int i = 1; i <= n; i++){
       cin >> a[i];
   }
    while(q--){
        int t, l, u; cin >> t >> l >> u;
        int x = 0;
        for (int i = 1; i <= u - l + 1; i++){
            //cout << i << endl;
            for (int j = l; j <= u - i + 1; j++){
                //cout << "j:::::" << j << endl;
                for (int k = j; k <= j + i - 1; k++){
                    x ^= a[k];
                }
            }
        }
        cout << x << endl;
    }
}
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 423 ms 348 KB Output is correct
2 Correct 359 ms 348 KB Output is correct
3 Correct 496 ms 348 KB Output is correct
4 Execution timed out 1062 ms 348 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1062 ms 1884 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -