# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
775599 | 2023-07-06T15:00:35 Z | HD1 | Trampoline (info1cup20_trampoline) | C++14 | 140 ms | 5692 KB |
//we are all lost trying to be someone. #include <bits/stdc++.h> #define fastio ios_base::sync_with_stdio(0); cin.tie(0); #define sz(x) ll(x.size()) #define reve(x) reverse(x.begin(),x.end()) #define ff first #define ss second using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll,ll> ii; const ll MAX=3*(1e4+100); const ll mod=1e9+7; const ll inf=1e18+7; vector<ll> A[MAX]; bool solve(){ ll x1, y1, x2, y2; cin>>x1>>y1>>x2>>y2; if(x1>x2 or y1>y2) return false; if(x1==x2 and y1<=y2) return true; else{ ll co=y1; for(ll i=x1; i<x2; i++){ ll cov=*lower_bound(A[i].begin(),A[i].end(),co); if(cov>=co and cov<=y2){ co=cov; } else{ return false; } } } return true; } int main(){ ll n, m, t; cin>>n>>m>>t; ll a, b; while(t--){ cin>>a>>b; A[a].push_back(b); } for(ll i=1; i<=n; i++){ sort(A[i].begin(), A[i].end()); } ll x1, y1, x2, y2; cin>>t; while(t--){ if(solve()) cout<<"Yes"<<'\n'; else cout<<"No"<<'\n'; } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 1108 KB | 200 token(s): yes count is 21, no count is 179 |
2 | Correct | 5 ms | 1236 KB | 200 token(s): yes count is 70, no count is 130 |
3 | Correct | 3 ms | 1108 KB | 197 token(s): yes count is 25, no count is 172 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 98 ms | 5692 KB | 4000 token(s): yes count is 99, no count is 3901 |
2 | Correct | 88 ms | 5572 KB | 4000 token(s): yes count is 91, no count is 3909 |
3 | Correct | 140 ms | 4836 KB | 4000 token(s): yes count is 4000, no count is 0 |
4 | Correct | 139 ms | 5560 KB | 4000 token(s): yes count is 1991, no count is 2009 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 1904 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 1788 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 1876 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |