# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
775599 | HD1 | Trampoline (info1cup20_trampoline) | C++14 | 140 ms | 5692 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//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';
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |