QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#95797#4389. Copy3360550356Compile Error//C++141.5kb2023-04-11 22:09:302023-04-11 22:09:34

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:09:34]
  • 评测
  • [2023-04-11 22:09:30]
  • 提交

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 = 2e5+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 
*   ┃        ┣┓
*    ┃        ┏┛
*     ┗┓┓┏━┳┓┏┛ + + + +
*    ┃┫┫ ┃┫┫
*    ┗┻┛ ┗┻┛+ + + +
*/

详细

/tmp/ccdZXkld.o: in function `_GLOBAL__sub_I_g':
answer.code:(.text.startup+0x28): relocation truncated to fit: R_X86_64_PC32 against `.bss'
collect2: error: ld returned 1 exit status