#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
using namespace std;
int n,q;
int s[100005],t[100005];
int main()
{
cin>>n>>q;
for (int i=0;i<n;i++)cin>>s[i]>>t[i];
while (q--){
int a,b,c,ct=0;
cin>>a>>b>>c;
for (int i=0;i<n;i++){
if (c<=s[i]+t[i]&& a<=s[i] && b<=t[i]) ct++;
}
cout<<ct<<"\n";
}
}
Compilation message
examination.cpp:4: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
4 | #pragma GCC optimization ("unroll-loops")
|
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
16 ms |
332 KB |
Output is correct |
8 |
Correct |
18 ms |
320 KB |
Output is correct |
9 |
Correct |
16 ms |
332 KB |
Output is correct |
10 |
Correct |
14 ms |
332 KB |
Output is correct |
11 |
Correct |
14 ms |
332 KB |
Output is correct |
12 |
Correct |
12 ms |
332 KB |
Output is correct |
13 |
Correct |
16 ms |
336 KB |
Output is correct |
14 |
Correct |
17 ms |
332 KB |
Output is correct |
15 |
Correct |
16 ms |
332 KB |
Output is correct |
16 |
Correct |
14 ms |
332 KB |
Output is correct |
17 |
Correct |
14 ms |
332 KB |
Output is correct |
18 |
Correct |
11 ms |
332 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
3036 ms |
2504 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
3036 ms |
2504 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
16 ms |
332 KB |
Output is correct |
8 |
Correct |
18 ms |
320 KB |
Output is correct |
9 |
Correct |
16 ms |
332 KB |
Output is correct |
10 |
Correct |
14 ms |
332 KB |
Output is correct |
11 |
Correct |
14 ms |
332 KB |
Output is correct |
12 |
Correct |
12 ms |
332 KB |
Output is correct |
13 |
Correct |
16 ms |
336 KB |
Output is correct |
14 |
Correct |
17 ms |
332 KB |
Output is correct |
15 |
Correct |
16 ms |
332 KB |
Output is correct |
16 |
Correct |
14 ms |
332 KB |
Output is correct |
17 |
Correct |
14 ms |
332 KB |
Output is correct |
18 |
Correct |
11 ms |
332 KB |
Output is correct |
19 |
Execution timed out |
3036 ms |
2504 KB |
Time limit exceeded |
20 |
Halted |
0 ms |
0 KB |
- |