QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#266729 | #6530. Programming Contest | chitoge | WA | 0ms | 3636kb | C++20 | 328b | 2023-11-26 17:09:08 | 2023-11-26 17:09:09 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int arr[100005];
int main(){
int tt;cin>>tt;
while(tt--){
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: 0
Wrong Answer
time: 0ms
memory: 3636kb
input:
4 2003 1 2020 2023 2003 1 2020 2003 2345 0 3456 3000 4 3001 3003 3004 3008 3007
output:
20 1 1112 1
result:
wrong answer 4th numbers differ - expected: '5', found: '1'