Submission #375064

# Submission time Handle Problem Language Result Execution time Memory
375064 2021-03-09T02:02:39 Z jass921026 Examination (JOI19_examination) C++14
2 / 100
50 ms 508 KB
#include<bits/stdc++.h>
using namespace std;
#define jizz ios_base::sync_with_stdio(false);cin.tie(NULL);
const int MAXN=3E3+10;
int s[MAXN], t[MAXN];
int main(){ jizz
    int n, q;
    cin>>n>>q;
    if(n>MAXN) return 0;
    for(int i=0;i<n;i++){
        cin>>s[i]>>t[i];
    }
    for(int i=0;i<q;i++){
        int a, b, c, cnt=0;
        cin>>a>>b>>c;
        for(int j=0;j<n;j++){
            if(s[j]>=a&&t[j]>=b&&s[j]+t[j]>=c){
                cnt++;
            }
        }
        cout<<cnt<<"\n";
    }
    return 0;
}
/*
5 4
35 100
70 70
45 15
80 40
20 95
20 50 120
10 10 100
60 60 80
0 100 100
*/
/*
10 10
41304 98327
91921 28251
85635 59191
30361 72671
28949 96958
99041 37826
10245 2726
19387 20282
60366 87723
95388 49726
52302 69501 66009
43754 45346 3158
25224 58881 18727
7298 24412 63782
24107 10583 61508
65025 29140 7278
36104 56758 2775
23126 67608 122051
56910 17272 62933
39675 15874 117117
*/
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 49 ms 492 KB Output is correct
8 Correct 49 ms 364 KB Output is correct
9 Correct 49 ms 492 KB Output is correct
10 Correct 48 ms 492 KB Output is correct
11 Correct 50 ms 364 KB Output is correct
12 Correct 48 ms 364 KB Output is correct
13 Correct 48 ms 508 KB Output is correct
14 Correct 50 ms 492 KB Output is correct
15 Correct 49 ms 492 KB Output is correct
16 Correct 22 ms 364 KB Output is correct
17 Correct 34 ms 492 KB Output is correct
18 Correct 11 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 49 ms 492 KB Output is correct
8 Correct 49 ms 364 KB Output is correct
9 Correct 49 ms 492 KB Output is correct
10 Correct 48 ms 492 KB Output is correct
11 Correct 50 ms 364 KB Output is correct
12 Correct 48 ms 364 KB Output is correct
13 Correct 48 ms 508 KB Output is correct
14 Correct 50 ms 492 KB Output is correct
15 Correct 49 ms 492 KB Output is correct
16 Correct 22 ms 364 KB Output is correct
17 Correct 34 ms 492 KB Output is correct
18 Correct 11 ms 364 KB Output is correct
19 Incorrect 1 ms 364 KB Output isn't correct
20 Halted 0 ms 0 KB -