답안 #313286

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
313286 2020-10-15T16:21:18 Z IWANTTOGETGOLDINIOI Examination (JOI19_examination) C++14
2 / 100
3000 ms 4984 KB
#include <bits/stdc++.h>

#define FOR(i,n) for(int i=0;i<n;i++)
#define FORE(i,a,b) for(int i=a;i<=b;i++)
#define ll long long int 
//#define int long long int
#define ld long double
#define vi vector<int>
#define pb push_back
#define ff first
#define ss second
#define pii pair<int,int>
#define ppii pair<ii,int>
#define pll pair<ll,ll>
#define vv vector
#define endl '\n'

using namespace std;

void solve(){	
	int n , q; cin >> n >> q;
	int s[n],t[n];
	FOR(i,n){
		cin >> s[i] >> t[i];
	}
	int x[q],y[q],z[q];
	FOR (i,q) {
		cin >> x[i] >> y[i] >> z[i];
	}
	// int j = 0;
	// int a= 0,b= 0,c= 0;
	FOR(j,q){
		int ans = 0;
		FOR(i,n){
			if(s[i]+t[i] >= z[j] && s[i] >= x[j] && t[i] >= y[j]) {
				ans++;
				//cout << "i= " << i << endl;
			}
		}
		cout << ans << endl;
	}
}


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

	int t = 1;
	//cin >> t;
	while (t--){
		solve();
	}
}

// template by rajarshi basu
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 384 KB Output is correct
5 Correct 0 ms 384 KB Output is correct
6 Correct 1 ms 384 KB Output is correct
7 Correct 48 ms 544 KB Output is correct
8 Correct 48 ms 512 KB Output is correct
9 Correct 48 ms 512 KB Output is correct
10 Correct 56 ms 568 KB Output is correct
11 Correct 56 ms 512 KB Output is correct
12 Correct 49 ms 504 KB Output is correct
13 Correct 56 ms 760 KB Output is correct
14 Correct 54 ms 512 KB Output is correct
15 Correct 54 ms 632 KB Output is correct
16 Correct 28 ms 512 KB Output is correct
17 Correct 45 ms 512 KB Output is correct
18 Correct 12 ms 512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3030 ms 4984 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3030 ms 4984 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 384 KB Output is correct
5 Correct 0 ms 384 KB Output is correct
6 Correct 1 ms 384 KB Output is correct
7 Correct 48 ms 544 KB Output is correct
8 Correct 48 ms 512 KB Output is correct
9 Correct 48 ms 512 KB Output is correct
10 Correct 56 ms 568 KB Output is correct
11 Correct 56 ms 512 KB Output is correct
12 Correct 49 ms 504 KB Output is correct
13 Correct 56 ms 760 KB Output is correct
14 Correct 54 ms 512 KB Output is correct
15 Correct 54 ms 632 KB Output is correct
16 Correct 28 ms 512 KB Output is correct
17 Correct 45 ms 512 KB Output is correct
18 Correct 12 ms 512 KB Output is correct
19 Execution timed out 3030 ms 4984 KB Time limit exceeded
20 Halted 0 ms 0 KB -