QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#747786#9587. 结课风云hanmxWA 1ms3564kbC++17515b2024-11-14 18:15:592024-11-14 18:16:04

Judging History

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

  • [2024-11-14 18:16:04]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3564kb
  • [2024-11-14 18:15:59]
  • 提交

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'