QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#266731#6530. Programming ContestchitogeWA 1ms3408kbC++20339b2023-11-26 17:10:492023-11-26 17:10:49

Judging History

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

  • [2023-11-26 17:10:49]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3408kb
  • [2023-11-26 17:10:49]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

int arr[100005];

int main(){
	int tt;cin>>tt;
	for(int i=1;i<=tt;i++){
		int l,r;
		cin>>l;
		int n;cin>>n;
		for(int i=0;i<n;i++){
			int x;cin>>x;
			arr[x]=tt;	
		}
		cin>>r;
		int ans=1;
		for(;l<r;l++){
			ans+=arr[l]!=tt;
		}
		cout<<ans<<endl;
	}
	
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3256kb

input:

4
2003
1 2020
2023
2003
1 2020
2003
2345
0
3456
3000
4 3001 3003 3004 3008
3007

output:

20
1
1112
5

result:

ok 4 number(s): "20 1 1112 5"

Test #2:

score: -100
Wrong Answer
time: 1ms
memory: 3408kb

input:

20
2072
52 2084 2341 2425 2528 3075 3263 3445 3452 3544 3594 3751 4301 4370 4577 4616 4790 4810 5138 5249 5455 5537 5735 5884 6169 6199 6215 6283 6312 6318 6334 6955 6988 7023 7031 7157 7277 7297 7410 7466 7482 7708 8021 8505 8833 8835 8857 9339 9406 9469 9621 9637 9717
8623
2193
61 2224 2499 2659 2...

output:

6509
848
2435
149
3845
4070
2771
6741
2403
6582
345
3991
3676
7067
6684
5549
1
1
3371
5078

result:

wrong answer 2nd numbers differ - expected: '851', found: '848'