QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#468992#5022. 【模板】线段树MODDI0 1545ms4160kbC++20792b2024-07-09 09:25:252024-07-09 09:25:25

Judging History

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

  • [2024-07-09 09:25:25]
  • 评测
  • 测评结果:0
  • 用时:1545ms
  • 内存:4160kb
  • [2024-07-09 09:25:25]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
#define pb push_back
#define mp make_pair
const int N = 250000 + 3;
int sub, n, q;
vector<int> arr;
int main(){
	cin>>sub>>n>>q;
	arr.resize(n);
	for(int i = 0; i < n; i++)	cin>>arr[i];
	bitset<N> now, tmp;
	for(int i = 0; i < n; i++) now[i] = arr[i];
	while(q--){
		int t;
		cin>>t;
		if(t == 1){
			int l, r;
			cin>>l>>r;
			l--; r--;
			tmp.set();
			tmp >>= l;
			tmp <<= (N - r + l);
			tmp >>= (N - r);
			tmp &= now;
			tmp <<= 1;
			now ^= 1;
		}
		else{
			int l;
			cin>>l;
			l--;
			cout<<(int)now[l]<<"\n";
		}
	}
	for (int i = 0; i < n; ++i) cout<<(int)now[i]<<"\n";
}

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3696kb

input:

1
6 6
1 1 5 1 9 4
2 5
1 2 5
2 4
1 3 6
2 6
1 1 6

output:

1
1
1
0
1
1
1
1
1

result:

wrong answer 1st numbers differ - expected: '9', found: '1'

Subtask #2:

score: 0
Wrong Answer

Test #6:

score: 0
Wrong Answer
time: 715ms
memory: 4124kb

input:

2
249998 99999
1048488450 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

wrong answer 2686th numbers differ - expected: '1048488450', found: '0'

Subtask #3:

score: 0
Wrong Answer

Test #10:

score: 0
Wrong Answer
time: 748ms
memory: 4156kb

input:

3
250000 99999
1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 1 0 1 0 0 1 0 0 1 1 1 0 0 0 1 1 1 1 1 1 0 0 1 1 1 1 0 0 0 0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 0 1 0 1 1 1 0 1 1 0 1 1 0 1 0 0 1 1...

output:

0
0
1
1
0
0
0
0
0
1
0
1
1
1
0
0
0
1
1
1
1
0
1
0
0
1
1
1
0
0
1
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
0
0
1
0
1
0
1
0
1
0
1
1
0
0
1
0
0
1
0
0
0
1
0
0
0
1
1
0
0
0
0
0
0
0
0
0
1
1
1
1
1
0
1
0
0
0
0
0
1
1
0
0
1
0
0
1
1
1
1
1
0
1
0
0
0
1
1
1
1
0
1
1
0
0
0
1
0
0
1
0
0
0
0
1
0
1
0
1
1
0
1
1
1
0
1
0
0
0
0
1
...

result:

wrong answer 3rd numbers differ - expected: '0', found: '1'

Subtask #4:

score: 0
Wrong Answer

Test #14:

score: 0
Wrong Answer
time: 769ms
memory: 4160kb

input:

4
249996 99997
309331355 195839266 912372930 57974187 363345291 954954162 650621300 389049294 821214285 263720748 231045308 844370953 768579771 664766522 681320982 124177317 32442094 297873605 743179832 1073656106 443742270 235746807 1054294813 974443618 422427461 307448375 1018255356 20105813 36821...

output:

1
1
1
0
0
1
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
0
1
1
0
0
1
0
0
0
1
1
1
1
1
1
0
1
1
1
0
1
1
0
0
1
0
0
1
0
1
0
1
1
0
1
0
0
0
0
1
1
1
0
0
1
0
0
0
1
1
1
1
0
1
0
0
0
0
1
0
1
0
0
1
1
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
1
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
0
0
1
0
1
0
0
0
1
...

result:

wrong answer 1st numbers differ - expected: '611117059', found: '1'

Subtask #5:

score: 0
Wrong Answer

Test #18:

score: 0
Wrong Answer
time: 1545ms
memory: 4080kb

input:

5
249997 99997
860563869 428592873 58576739 761578583 47999879 294581118 988847649 569566599 640106250 440172702 178219106 966598261 763325707 846927552 877923116 145156535 246778542 25949847 507939778 116507169 555239769 259969305 328955819 171606729 535970481 121608060 4437163 370976515 713807003 ...

output:

0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

wrong answer 1st numbers differ - expected: '860563869', found: '0'

Subtask #6:

score: 0
Skipped

Dependency #5:

0%

Subtask #7:

score: 0
Skipped

Dependency #5:

0%

Subtask #8:

score: 0
Skipped

Dependency #1:

0%