Submission #693335

#TimeUsernameProblemLanguageResultExecution timeMemory
693335Ahmed_SolymanTrampoline (info1cup20_trampoline)C++14
0 / 100
45 ms1784 KiB
#include <bits/stdc++.h> #include <ext/rope> using namespace std; using namespace __gnu_cxx; #pragma GCC optimize("-Ofast") #pragma GCC optimize("-O1") //-------------------------------------------------------------// typedef long long ll; typedef unsigned long long ull; #define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define PI acos(-1) #define lb lower_bound #define ub upper_bound #define endl '\n' #define all(v) v.begin(),v.end() #define allr(v) v.rbegin(),v.rend() #define sum_to(n) (n*(n+1))/2 #define pb push_back #define pf push_front #define sz size() #define fil(arr,x) memset(arr,x,sizeof(arr)) const ll mod=1e9+7; int dx[8]={0,1,0,-1,1,1,-1,-1}; int dy[8]={1,0,-1,0,1,-1,-1,1}; //-------------------------------------------------------------// ll lcm(ll a,ll b) { return (max(a,b)/__gcd(a,b))*min(a,b); } void person_bool(bool x) { cout<<(x?"YES":"NO")<<endl; } int main() { //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); fast int r,c,n; cin>>r>>c>>n; vector<vector<int>>arr(r+1); for(int i=0;i<n;i++){ int x,y; cin>>x>>y; arr[x].pb(y); } for(int i=1;i<=r;i++){ sort(all(arr[i])); } int q;cin>>q; while(q--){ int x,y,a,b; cin>>x>>y>>a>>b; if(a<x || b<y){ swap(x,a); swap(b,y); } else{ int p=y; bool valid=1; for(int i=x;i<a;i++){ int j=lb(all(arr[i]),p)-arr[i].begin(); if(j==arr[i].sz){ valid=0; break; } else{ p=arr[i][j]; } } cout<<(valid?"Yes":"No")<<endl; } } return 0; }

Compilation message (stderr)

trampoline.cpp: In function 'int main()':
trampoline.cpp:64:12: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   64 |        if(j==arr[i].sz){
      |            ^
#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...