# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
365872 | 2021-02-12T13:15:33 Z | Belal | Trampoline (info1cup20_trampoline) | C++14 | 2000 ms | 50724 KB |
#include <bits/stdc++.h> using namespace std; int r,c,n; map <int,vector<int> > arr1; map <int,vector<int> > arr2; bool fun(int a,int b,int x,int y){ if(a>x||b>y){return false;} if(a==x){return true;} int lim=y; for(int i=x-1;i>=a;i--){ if(arr1[i].size()==0){return false;} for(int j=0;j<arr1[i].size();j++){ if(arr1[i][j]<=lim){ if(arr1[i][j]>b){ if(i==a){return true;} lim==arr1[i][j]; break; } else{return false;} } } } } int main() { int a,b,x,y; cin>>r>>c>>n; for(int i=0;i<n;i++){ cin>>a>>b; arr1[a].push_back(b); arr2[b].push_back(a); } map<int,vector<int> > :: iterator it=arr1.begin(); for( ;it != arr1.end();it++){ sort(arr1[it->first].begin(),arr1[it->first].end(),greater<int>()); } int t; cin>>t; for(int i=0;i<t;i++){ cin>>a>>b>>x>>y; if(fun(a,b,x,y)){cout<<"Yes"<<endl;} else{cout<<"No"<<endl;} } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 12 ms | 620 KB | expected NO, found YES [2nd token] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2084 ms | 4004 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 401 ms | 50724 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 15 ms | 2028 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2053 ms | 35312 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |