답안 #788677

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
788677 2023-07-20T13:22:08 Z prefixorsuuffiixx Examination (JOI19_examination) C++14
2 / 100
3000 ms 4824 KB
//ashoori is my love
//ashoori is my love//ashoori is my love//ashoori is my love//ashoori is my love//ashoori is my love
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef int it;
typedef pair<ll, ll> pii;
typedef pair<ll, pii> piii;
#pragma GCC optimize ("O3")
#pragma GCC target("avx2")
#pragma GCC optimize("unroll-loops,Ofast")
#define sep  "\n"
#define pes  " "
#define int long long
#define print(x,n) for(int i=1; i<=n ; i++)cout<<x[i]<<" "
#define scan(x,n) for(int i=1 ; i<=n ; i++)cin>>x[i]
#define all(x) x.begin(), x.end()
#define pb push_back
#define F first
#define Se second
#define sz size
#define cin2(r,j) cin>>r>>j
#define cin1(r) cin>>r
#define cin3(r,j,k) cin>>r>>j>>k
# define InTheNameOfGod                                  ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);

const int maxx=1e5+1000;
const ll MOD=1000000007;
const ll inf=1e18;

int a[maxx],b[maxx];

void solve(){
    int n , m ;
    cin>>n>>m;
    for(int i = 1 ; i <= n ; i++)cin>>a[i]>>b[i];

    for(int i = 1 ; i <= m ; i++){
        int ans = 0;
        int x , y , z;
        cin>>x>>y>>z;
        for(int j = 1 ; j <= n ; j++ ) if(a[j]>=x && b[j]>=y && a[j]+b[j] >= z)ans++;
        cout<<ans<<"\n";
    }



}




/*===========================================================================================================================*/
signed main(){
    InTheNameOfGod;
    //int tt = clock();
    //cout << fixed << setprecision(6);

    int tc = 1;
    //cin>>tc;

    //for(int i = 1 ; i <= 3 ; i++)cout<<dp[i]<<" ";
    while(tc--){solve();

        //cerr << "TIME = " << clock() - tt << endl;
        //tt = clock();
        }


}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 5 ms 468 KB Output is correct
8 Correct 5 ms 468 KB Output is correct
9 Correct 5 ms 468 KB Output is correct
10 Correct 4 ms 468 KB Output is correct
11 Correct 4 ms 472 KB Output is correct
12 Correct 4 ms 340 KB Output is correct
13 Correct 5 ms 468 KB Output is correct
14 Correct 5 ms 468 KB Output is correct
15 Correct 5 ms 472 KB Output is correct
16 Correct 5 ms 420 KB Output is correct
17 Correct 5 ms 468 KB Output is correct
18 Correct 4 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3086 ms 4824 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3086 ms 4824 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 5 ms 468 KB Output is correct
8 Correct 5 ms 468 KB Output is correct
9 Correct 5 ms 468 KB Output is correct
10 Correct 4 ms 468 KB Output is correct
11 Correct 4 ms 472 KB Output is correct
12 Correct 4 ms 340 KB Output is correct
13 Correct 5 ms 468 KB Output is correct
14 Correct 5 ms 468 KB Output is correct
15 Correct 5 ms 472 KB Output is correct
16 Correct 5 ms 420 KB Output is correct
17 Correct 5 ms 468 KB Output is correct
18 Correct 4 ms 340 KB Output is correct
19 Execution timed out 3086 ms 4824 KB Time limit exceeded
20 Halted 0 ms 0 KB -