Submission #920915

# Submission time Handle Problem Language Result Execution time Memory
920915 2024-02-03T07:36:27 Z zhehan Trampoline (info1cup20_trampoline) C++14
0 / 100
424 ms 1048576 KB
#include <bits/stdc++.h>

using namespace std;

#define int long long

signed main()
{
    int r,c,n,t;
    cin>>r>>c>>n;
    vector<int>m(r+1,c+10);
    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(x1==x2) cout<<"Yes"<<'\n';
        else{
            bool pass{true};
            for(int j{x1};j<x2;++j){
                if(!(m[j]>=y1&&m[j]<=y2)){
                    pass=false;
                }else{
                    y1=m[j];
                }
            }
            if(pass){
                cout<<"Yes"<<'\n';
            }else{
                cout<<"No"<<'\n';
            }
        }
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 348 KB expected YES, found NO [1st token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 71 ms 348 KB expected YES, found NO [3rd token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 424 ms 1048576 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 385 ms 1048576 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 350 ms 1048576 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -