Submission #489218

# Submission time Handle Problem Language Result Execution time Memory
489218 2021-11-21T15:23:15 Z ak2006 Examination (JOI19_examination) C++14
2 / 100
3000 ms 7192 KB
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vb = vector<bool>;
using vvb = vector<vb>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
const ll mod = 1e9 + 7,inf = 1e18;
#define pb push_back
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
void setIO()
{
    fast;
}
int main()
{
    setIO();
    int n,q;
    cin>>n>>q;
    vvi A(n,vi(2));
    for (int i = 0;i<n;i++)cin>>A[i][0]>>A[i][1];
    while (q--){
        int a,b,c;
        cin>>a>>b>>c;
        int ans = 0;
        for (int i = 0;i<n;i++){
            if (A[i][0] >= a and A[i][1] >= b
                and A[i][0] + A[i][1] >= c)
                ans++;
        }
        cout<<ans<<"\n";
    }
    return 0;
}

Compilation message

examination.cpp:17: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
   17 | #pragma GCC optimization ("O3")
      | 
examination.cpp:18: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
   18 | #pragma GCC optimization ("unroll-loops")
      |
# Verdict Execution time Memory Grader output
1 Correct 0 ms 208 KB Output is correct
2 Correct 0 ms 208 KB Output is correct
3 Correct 0 ms 208 KB Output is correct
4 Correct 0 ms 208 KB Output is correct
5 Correct 0 ms 208 KB Output is correct
6 Correct 0 ms 208 KB Output is correct
7 Correct 43 ms 632 KB Output is correct
8 Correct 45 ms 628 KB Output is correct
9 Correct 45 ms 592 KB Output is correct
10 Correct 42 ms 576 KB Output is correct
11 Correct 44 ms 580 KB Output is correct
12 Correct 44 ms 508 KB Output is correct
13 Correct 43 ms 600 KB Output is correct
14 Correct 43 ms 596 KB Output is correct
15 Correct 43 ms 596 KB Output is correct
16 Correct 20 ms 564 KB Output is correct
17 Correct 30 ms 464 KB Output is correct
18 Correct 8 ms 464 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 3079 ms 7192 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 3079 ms 7192 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 208 KB Output is correct
2 Correct 0 ms 208 KB Output is correct
3 Correct 0 ms 208 KB Output is correct
4 Correct 0 ms 208 KB Output is correct
5 Correct 0 ms 208 KB Output is correct
6 Correct 0 ms 208 KB Output is correct
7 Correct 43 ms 632 KB Output is correct
8 Correct 45 ms 628 KB Output is correct
9 Correct 45 ms 592 KB Output is correct
10 Correct 42 ms 576 KB Output is correct
11 Correct 44 ms 580 KB Output is correct
12 Correct 44 ms 508 KB Output is correct
13 Correct 43 ms 600 KB Output is correct
14 Correct 43 ms 596 KB Output is correct
15 Correct 43 ms 596 KB Output is correct
16 Correct 20 ms 564 KB Output is correct
17 Correct 30 ms 464 KB Output is correct
18 Correct 8 ms 464 KB Output is correct
19 Execution timed out 3079 ms 7192 KB Time limit exceeded
20 Halted 0 ms 0 KB -