Submission #788693

# Submission time Handle Problem Language Result Execution time Memory
788693 2023-07-20T13:34:05 Z prefixorsuuffiixx Examination (JOI19_examination) C++14
2 / 100
3000 ms 4204 KB
#include <bits/stdc++.h>
#pragma GCC target ("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast,unroll-loops")
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    int n,m;
    cin>>n>>m;
    int a[n],b[n];
    for (int i = 0;i<n;i++)cin>>a[i]>>b[i];
    long long ans;
    int x,y,z;
    while(m--){
        ans = 0;
        cin>>x>>y>>z;
        for (int i = 0; i < n; i++)ans += (a[i] >= x & b[i] >= y & a[i]+b[i]>=z);
        cout << ans << '\n';
    }
}

Compilation message

examination.cpp: In function 'int main()':
examination.cpp:18:49: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   18 |         for (int i = 0; i < n; i++)ans += (a[i] >= x & b[i] >= y & a[i]+b[i]>=z);
      |                                            ~~~~~^~~~
examination.cpp:18:77: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   18 |         for (int i = 0; i < n; i++)ans += (a[i] >= x & b[i] >= y & a[i]+b[i]>=z);
      |                                                                    ~~~~~~~~~^~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 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 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 5 ms 340 KB Output is correct
8 Correct 4 ms 340 KB Output is correct
9 Correct 4 ms 340 KB Output is correct
10 Correct 4 ms 340 KB Output is correct
11 Correct 4 ms 352 KB Output is correct
12 Correct 4 ms 352 KB Output is correct
13 Correct 5 ms 340 KB Output is correct
14 Correct 4 ms 340 KB Output is correct
15 Correct 4 ms 340 KB Output is correct
16 Correct 4 ms 340 KB Output is correct
17 Correct 4 ms 352 KB Output is correct
18 Correct 4 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2996 ms 1544 KB Output is correct
2 Execution timed out 3060 ms 4204 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2996 ms 1544 KB Output is correct
2 Execution timed out 3060 ms 4204 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 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 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 5 ms 340 KB Output is correct
8 Correct 4 ms 340 KB Output is correct
9 Correct 4 ms 340 KB Output is correct
10 Correct 4 ms 340 KB Output is correct
11 Correct 4 ms 352 KB Output is correct
12 Correct 4 ms 352 KB Output is correct
13 Correct 5 ms 340 KB Output is correct
14 Correct 4 ms 340 KB Output is correct
15 Correct 4 ms 340 KB Output is correct
16 Correct 4 ms 340 KB Output is correct
17 Correct 4 ms 352 KB Output is correct
18 Correct 4 ms 340 KB Output is correct
19 Correct 2996 ms 1544 KB Output is correct
20 Execution timed out 3060 ms 4204 KB Time limit exceeded
21 Halted 0 ms 0 KB -