Submission #920889

# Submission time Handle Problem Language Result Execution time Memory
920889 2024-02-03T07:24:46 Z zhehan Trampoline (info1cup20_trampoline) C++14
0 / 100
2000 ms 19540 KB
#include <bits/stdc++.h>

using namespace std;

#define int long long

signed main()
{
    int r,c,n,t;
    cin>>r>>c>>n;
    map<int,int> m;
    for(int i{};i<n;++i){
        int a,b;
        cin>>a>>b;
        if(m[a]==0){
            m[a]=b;
        }else{}
        m[a]=min(m[a],b);
    }
    cin>>t;
    for(int i{};i<t;++i){
        int x1,x2,y1,y2;
        cin>>x1>>y1>>x2>>y2;
        if(y1==y2) cout<<"Yes"<<'\n';
        else{
            bool pass{true};
            for(int j{x1};j<x2;++j){
                if(!(m[j]>y1&&m[j]<y2)){
                    pass=false;
                }
            }
            if(pass){
                cout<<"Yes"<<'\n';
            }else{
                cout<<"No"<<'\n';
            }
        }
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 348 KB expected YES, found NO [1st token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 259 ms 1852 KB expected YES, found NO [3rd token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 558 ms 7232 KB expected YES, found NO [4th token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2027 ms 19540 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2054 ms 9364 KB Time limit exceeded
2 Halted 0 ms 0 KB -