QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#747786 | #9587. 结课风云 | hanmx | WA | 1ms | 3564kb | C++17 | 515b | 2024-11-14 18:15:59 | 2024-11-14 18:16:04 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using i64=long long;
using u64=unsigned long long;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin>>n;
int a,b,c;
cin>>a>>b>>c;
vector<int> x(n+1),y(n+1);
for(int i=1;i<=n;i++) cin>>x[i]>>y[i];
int d;
cin>>d;
int ans=0;
for(int i=1;i<=n;i++){
x[i]+=d;
if(x[i]>=a) x[i]=a;
if(x[i]+y[i]>=c) ans++;
}
cout<<ans;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3564kb
input:
5 40 60 60 20 25 10 40 25 30 35 50 40 60 10
output:
4
result:
wrong answer 1st lines differ - expected: '2', found: '4'