QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#57633 | #4389. Copy | qinjianbin# | WA | 142ms | 42424kb | C++17 | 854b | 2022-10-22 16:13:46 | 2022-10-22 16:13:49 |
Judging History
answer
#include <bits/stdc++.h>
#include <ext/rope>
#define rep(i, a, b) for(int i = (a); i < (b); i++)
#define _for(i, a, b) for(int i = (a); i <= (b); i++)
using namespace std;
using namespace __gnu_cxx;
int n, q;
int main()
{
int T; scanf("%d", &T);
while(T--)
{
scanf("%d%d", &n, &q);
rope<int> a;
a.push_back(0);
_for(i, 1, n)
{
int x; scanf("%d", &x);
a.push_back(x);
}
int ans = 0;
while(q--)
{
// for(int x: a) printf("%d ", x); puts("");
int op; scanf("%d", &op);
if(op == 1)
{
int l, r;
scanf("%d%d", &l, &r);
a = a.substr(a.begin(), a.end() - 1) +
a.substr(a.begin() + l, a.begin() + r + 1) +
a.substr(a.end() - 1, a.end());
}
else
{
int x; scanf("%d", &x);
ans ^= a[x];
}
}
printf("%d\n", ans);
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 142ms
memory: 42424kb
input:
2 5 10 14138491 23289232 33892225 43531245 54436322 1 1 4 2 2 2 3 2 4 2 5 1 2 4 2 2 2 3 2 4 2 5 99990 99990 493133979 94198606 751145654 147404311 601524088 744747426 561746143 212260573 241231749 810352224 81276441 382492450 18779020 317505899 880615584 654793240 417574821 822313301 140569958 69317...
output:
0 788824404
result:
wrong answer 1st lines differ - expected: '28631531', found: '0'