Submission #365871

# Submission time Handle Problem Language Result Execution time Memory
365871 2021-02-12T13:15:06 Z Ahmad_Hasan Trampoline (info1cup20_trampoline) C++17
0 / 100
121 ms 3180 KB
#include <bits/stdc++.h>
#define int long long
/**
     ||||||||||       |||||     |||||    ||||||||||
    |||||||||||||     |||||     |||||  |||||
   ||||     ||||||    |||||     |||||  |||||
  |||||||||||||||||   |||||||||||||||    ||||||||||
 |||||||||||||||||||  |||||||||||||||           |||||
 |||||         |||||  |||||     |||||           |||||
 |||||         |||||  |||||     |||||    ||||||||||
AHMED;HASSAN;SAEED;
*/

using namespace std;

int32_t main()
{
    /**ios_base::sync_with_stdio(0);
    cin.tie(0);      cout.tie(0);*/
    int r,c,n;
    cin>>r>>c>>n;
    vector<vector<int> >grs(r+5);
    for(int i=0;i<n;i++){
        int x,y;
        cin>>x>>y;
        grs[x].push_back(y);
    }
    int t;
    cin>>t;
    while(t--){
        int xs,ys,xe,ye;
        cin>>xs>>ys>>xe>>ye;
        int f=1;
        while(xs!=xe){
            if(xs>xe||ys>ye){
                f=0;
                break;
            }
            vector<int>::iterator it=lower_bound(grs[xs].begin(),grs[xs].end(),ys);
            ys=*it;
            xs++;
            if(it==grs[xs].end()||xs>xe||ys>ye){
                f=0;
                break;
            }

        }
        if(f)
            cout<<"Yes\n";
        else
            cout<<"No\n";

    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 492 KB expected YES, found NO [1st token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 121 ms 3180 KB expected YES, found NO [3rd token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 620 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 620 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 620 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -