Submission #630215

# Submission time Handle Problem Language Result Execution time Memory
630215 2022-08-16T05:32:09 Z codr0 Examination (JOI19_examination) C++14
2 / 100
3000 ms 2748 KB
// Code by Parsa Eslami

#include <bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>

#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FORR(i,a,b) for(int i=a;i>=b;i--)
#define maxm(a,b) a=max(a,b)
#define minm(a,b) a=min(a,b)
#define bit(i,j) ((j>>i)&1)
#define pb push_back
#define all(x) x.begin(),x.end()
#define SZ(x) (int)x.size()
#define err(x) cerr<<#x<<" : "<<x<<'\n'
#define dmid int mid=(r+l)/2
#define lc 2*id
#define rc 2*id+1

using namespace std;

	int main(){
	iostream::sync_with_stdio(0); cin.tie(0);	

	int n,q; cin>>n>>q;
	int a[n+1],b[n+1];
	FOR(i,1,n) cin>>a[i]>>b[i];
	FOR(_,1,q){
		int A,B,C; cin>>A>>B>>C;
		int ans=0;
		FOR(i,1,n) if(a[i]>=A&&b[i]>=B&&(a[i]+b[i])>=C) ans++;
		cout<<ans<<'\n';
	}

	return 0;
	}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 320 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 41 ms 456 KB Output is correct
8 Correct 39 ms 472 KB Output is correct
9 Correct 42 ms 484 KB Output is correct
10 Correct 41 ms 440 KB Output is correct
11 Correct 41 ms 436 KB Output is correct
12 Correct 40 ms 372 KB Output is correct
13 Correct 39 ms 468 KB Output is correct
14 Correct 42 ms 460 KB Output is correct
15 Correct 40 ms 452 KB Output is correct
16 Correct 19 ms 416 KB Output is correct
17 Correct 28 ms 340 KB Output is correct
18 Correct 11 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 3066 ms 2748 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 3066 ms 2748 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 320 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 41 ms 456 KB Output is correct
8 Correct 39 ms 472 KB Output is correct
9 Correct 42 ms 484 KB Output is correct
10 Correct 41 ms 440 KB Output is correct
11 Correct 41 ms 436 KB Output is correct
12 Correct 40 ms 372 KB Output is correct
13 Correct 39 ms 468 KB Output is correct
14 Correct 42 ms 460 KB Output is correct
15 Correct 40 ms 452 KB Output is correct
16 Correct 19 ms 416 KB Output is correct
17 Correct 28 ms 340 KB Output is correct
18 Correct 11 ms 340 KB Output is correct
19 Execution timed out 3066 ms 2748 KB Time limit exceeded
20 Halted 0 ms 0 KB -