Submission #426973

#TimeUsernameProblemLanguageResultExecution timeMemory
426973kai824Trampoline (info1cup20_trampoline)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; typedef pair<int,int> pii; #define mp make_pair #define f first #define s second vector<int> oo[2505]; int32_t main(){ ios_base::sync_with_stdio(false);cin.tie(0); int r,c,n; cin>>r>>c>>n; int a,b,d; for(int i=0;i<n;i++){ cin>>a>>b; oo[a].push_back(b); } for(int i=0;i<=r;i++){ if(oo[i].size()>0)sort(oo[i].begin(),oo[i].end()); } int q; cin>>q; while(q--){ cin>>a>>b>>c>>d; if(a>c)goto hell; int cur=b; for(int j=a;j<c;j++){ if(oo[j].size()==0 || oo[j].back()<cur)goto hell; cur=*lower_bound(oo[j].begin(),oo[j].end(),cur); if(cur>d)goto hell; } if(cur>d)goto hell; cout<<"Yes\n";continue; hell:; cout<<"No\n"; } }

Compilation message (stderr)

trampoline.cpp: In function 'int32_t main()':
trampoline.cpp:37:5: error: jump to label 'hell'
   37 |     hell:;
      |     ^~~~
trampoline.cpp:27:17: note:   from here
   27 |     if(a>c)goto hell;
      |                 ^~~~
trampoline.cpp:28:9: note:   crosses initialization of 'int cur'
   28 |     int cur=b;
      |         ^~~