QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#95796#4389. Copy3360550356RE 0ms0kbC++141.5kb2023-04-11 22:08:412023-04-11 22:08:43

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-11 22:08:43]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2023-04-11 22:08:41]
  • 提交

answer

 #include <bits/stdc++.h>
#define endl '\n'
#define int long long 
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> PII;
const int N = 2e3+10;
const int M = 2e6 + 10;
const int mod = 998244353;
const int INF=1e9;
const double PI=acos(-1);
const double eps=1e-10;

bitset<N>g[N];
int a[N];
void solve(){
	int n,q; 
	cin>>n>>q;
    for(int i = 1; i <= n; i++)cin>>a[i];
    int ans = 0;
    while(q--){
        int op;  cin>>op;
        if(op==1){
            int l, r;  cin>>l>>r;
            int len = r-l+1;
            for(int i = n; i >= r+1; i--)a[i] = a[i-len];
        }else{
            int x;  cin>>x;
            ans ^= a[x];
        }
    }
    cout<<ans<<endl;
}

signed main() {
	int T=1;
//	cin>>T;
	while(T--) {
		solve();
	}
}

/**
*  ┏┓   ┏┓+ +
* ┏┛┻━━━┛┻┓ + +
* ┃       ┃
* ┃   ━   ┃ ++ + + +
*  ████━████+
*  ◥██◤ ◥██◤ +
* ┃   ┻   ┃
* ┃       ┃ + +
* ┗━┓   ┏━┛
*   ┃   ┃ + + + +Code is far away from  
*   ┃   ┃ + bug with the animarr protecting
*   ┃    ┗━━━┓ 神兽保佑,代码无bug 
*   ┃        ┣┓
*    ┃        ┏┛
*     ┗┓┓┏━┳┓┏┛ + + + +
*    ┃┫┫ ┃┫┫
*    ┗┻┛ ┗┻┛+ + + +
*/

详细

Test #1:

score: 0
Runtime Error

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:


result: