Submission #520504

#TimeUsernameProblemLanguageResultExecution timeMemory
520504sktlzzTrampoline (info1cup20_trampoline)C++14
11 / 100
2064 ms13296 KiB
#include <bits/stdc++.h> using namespace std; #define deb(x) cout << #x<<' '<< x <<'\n' #define ios ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define fo(i,n) for(i=0;i<n;i++) #define Fo(i,k,n) for(i=k;i<n;i++) #define ro(i,n) for(i=n;i<=0;i--) #define Ro(i,k,n) for(i=k;i<n;i--) #define ll long long #define pll pair<ll,ll> #define tll tuple<ll, ll, ll> #define vl vector<ll> #define vpll vector<pll> #define pb push_back #define MEMINF 0x3f // ll 456e16, int 11e8 #define MEMINFB 0x7f // ll 919e16, int 21e8 #define MEMINFN 0x80 // ll -810e16, int -19e8 #define INF LLONG_MAX #define MM <<" "<< #define endl "\n" int main(){ ios; ll i,j,k,n,m,r,c,q; pll newpt; cin >> r >> c >>n; vpll v(n); fo(i,n){ cin >> j >> k; v[i] = {j,k}; } sort(v.begin(),v.end()); cin >> q; fo(i,q){ // cout <<endl<<endl; bool ans = true; ll x1,y1,x2,y2; cin >> x1 >> y1 >> x2 >> y2; if (x1 > x2 || (x1==x2 && y1 > y2) ) {ans = false;} else{ pll cur = {x1,y1}; while (cur.first < x2 ){ newpt = *lower_bound(v.begin(),v.end(),cur); // cout << newpt.first MM newpt.second<<endl; if (newpt.first > cur.first || newpt.second > y2 ) { ans = false; break;} else cur ={newpt.first+1,newpt.second}; } if (ans) cout <<"Yes"<<endl; else cout <<"No" <<endl; } } }

Compilation message (stderr)

trampoline.cpp: In function 'int main()':
trampoline.cpp:25:16: warning: unused variable 'm' [-Wunused-variable]
   25 |     ll i,j,k,n,m,r,c,q;
      |                ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...