Submission #1145163

#TimeUsernameProblemLanguageResultExecution timeMemory
1145163dobri_okeTrampoline (info1cup20_trampoline)C++20
Compilation error
0 ms0 KiB
//#pragma GCC target ("avx2") //#pragma GCC optimize ("Ofast") #include <bits/stdc++.h> using namespace std; #define int long long #define F first #define S second #define pb push_back const int N = 1e6, NN=26; const int mod=1e9+7; vector <int > v[N]; //int gcd(int a, int b) { if (b == 0) return a; else return gcd(b, a % b); } //int lcm(int a, int b) { return a / gcd(a, b) * b; } //int binpow(int a,int b){if(!b)return 1; if(b&1)return a*binpow(a,b-1)%mod; int x=binpow(a,b/2); return x*x%mod;} signed main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int r, c, n; cin >> r >> c >> n; map < pair < int, int >, bool > mp; set < int > st; for(int i=1;i<=n;i++){ int a, b; cin >> a >> b; mp[{a, b}]=1; v[a].pb(b); st.insert(a); } if(t<=4000 && r<=2500 && c<=2500){ int t; cin >> t; while(t--){ int xs, ys, xe, ye; cin >> xs >> ys >> xe >> ye; while(xs<xe){ if(ys>ye) break; if(mp[{xs, ys}]==0){ ys++; } else{ xs++; } } if(xs==xe && ys<=ye) cout << "Yes\n"; else cout << "No\n"; } } } else{ int t; cin >> t; while(st.size()>0){ int g=*st.begin(); st.erase(g); sort(v[g].begin(), v[g].end()); } while(t--){ int xs, ys, xe, ye; cin >> xs >> ys >> xe >> ye; while(xs<xe){ int l=0, r=v[xs].size()-1, jump=-1; while(l<=r){ int m=(l+r)/2; if(v[xs][m]<=ys){ l=m+1; } else{ r=m-1; jump=m; } } if(jump==-1) break; else{ ys=v[xs][jump]; xs++; } } if(xs==xe && ys<=ye) cout << "Yes\n"; else cout << "No\n"; } } }

Compilation message (stderr)

trampoline.cpp: In function 'int main()':
trampoline.cpp:30:8: error: 't' was not declared in this scope; did you mean 'st'?
   30 |     if(t<=4000 && r<=2500 && c<=2500){
      |        ^
      |        st
trampoline.cpp:31:13: error: redeclaration of 'long long int t'
   31 |         int t;
      |             ^
trampoline.cpp:30:8: note: '<typeprefixerror>t' previously declared here
   30 |     if(t<=4000 && r<=2500 && c<=2500){
      |        ^
trampoline.cpp: At global scope:
trampoline.cpp:50:5: error: expected unqualified-id before 'else'
   50 |     else{
      |     ^~~~
trampoline.cpp:83:1: error: expected declaration before '}' token
   83 | }
      | ^