답안 #995238

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
995238 2024-06-08T17:25:08 Z ASGA_RedSea Examination (JOI19_examination) C++17
2 / 100
3000 ms 2720 KB
/**
 
                                    * بسم الله الرحمن الرحيم *
 
                ﴾ رَبِّ اشْرَحْ لِي صَدْرِي * وَيَسِّرْ لِي أَمْرِي * وَاحْلُلْ عُقْدَةً مِّن لِّسَانِي * يَفْقَهُوا قَوْلِي ﴿
 
*/
 
/// author : "ASGA"
 
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
 
#include <bits/stdc++.h>
 
using namespace std;
 
signed main(){
    ios_base::sync_with_stdio(0);cin.tie(0);
 
    int n,q,x,y,z,ans;
  	cin >> n >> q;
    vector <pair <int,int>> a(n);
    for(int i = 0;i < n;i++)cin >> a[i].first >> a[i].second;
    while(q--){
        cin >> x >> y >> z;ans = 0;
        for(int i = 0;i < n;i++)ans += (x <= a[i].first && y <= a[i].second && z <= a[i].first + a[i].second);
        cout << ans << '\n';
    }
 
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 4 ms 348 KB Output is correct
8 Correct 4 ms 348 KB Output is correct
9 Correct 5 ms 348 KB Output is correct
10 Correct 4 ms 348 KB Output is correct
11 Correct 4 ms 348 KB Output is correct
12 Correct 4 ms 484 KB Output is correct
13 Correct 6 ms 344 KB Output is correct
14 Correct 4 ms 600 KB Output is correct
15 Correct 5 ms 348 KB Output is correct
16 Correct 4 ms 348 KB Output is correct
17 Correct 4 ms 348 KB Output is correct
18 Correct 4 ms 484 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3073 ms 2720 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3073 ms 2720 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 4 ms 348 KB Output is correct
8 Correct 4 ms 348 KB Output is correct
9 Correct 5 ms 348 KB Output is correct
10 Correct 4 ms 348 KB Output is correct
11 Correct 4 ms 348 KB Output is correct
12 Correct 4 ms 484 KB Output is correct
13 Correct 6 ms 344 KB Output is correct
14 Correct 4 ms 600 KB Output is correct
15 Correct 5 ms 348 KB Output is correct
16 Correct 4 ms 348 KB Output is correct
17 Correct 4 ms 348 KB Output is correct
18 Correct 4 ms 484 KB Output is correct
19 Execution timed out 3073 ms 2720 KB Time limit exceeded
20 Halted 0 ms 0 KB -