QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#691955 | #6530. Programming Contest | Reiko# | WA | 0ms | 3564kb | C++17 | 469b | 2024-10-31 13:31:50 | 2024-10-31 13:31:51 |
Judging History
answer
#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long ll;
int s[105];
void solve(){
int y1, n, y2;
cin>>y1;
cin>>n;
for(int i=1; i<=n; i++)
cin>>s[i];
cin>>y2;
int x=0;
for(int i=1; i<n; i++){
if(y2>=s[i] && y2<=s[i+1]){
x=i;
break;
}
}
cout<<y2-y1+1-x<<endl;
}
int main(){
std::ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int T=1;
cin>>T;
while(T--)
solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3564kb
input:
4 2003 1 2020 2023 2003 1 2020 2003 2345 0 3456 3000 4 3001 3003 3004 3008 3007
output:
21 1 1112 5
result:
wrong answer 1st numbers differ - expected: '20', found: '21'