Submission #72285
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #include<bits/stdc++.h> #define dou double #define ll long long #define all(x) x.begin(),x.end() #define gre greater<>() #define int2 int,int #define pb push_back #define mp make_pair #define emp emplace #define rep(i,a,n) for(int i=(int)(a);i<(int)(n);i++) #define p_rep(i,a,n) for(int i=(int)(a);i<=(int)(n);i++) #define r_rep(i,a,n) for(int i=(int)(a);i>(int)(n);i--) #define rp_rep(i,a,n) for(int i=(int)(a);i>=(int)(n);i--) #define fir first #define sec second #define uns unsigned #define fix(x,k) fixed<<setprecision(k)<<x #define total(n) n*(n+1)/2 //nまでの総和 #define lcm(a,b) (a*b)/__gcd(a,b) //aとbの最小公倍数 #define center(a,b) (a+b)/2 //aとbの中央値 #define Yes cout<<"Yes\n" #define No cout<<"No\n" #define vi vector<int> #define vll vector<ll> #define vs vector<string> #define vpi vector<pair<int2>> #define uni(x) x.erase(unique(x.begin(),x.end()), x.end()) //vector重複削除 #define outSM(i,x) for(auto i=x.begin();i<x.end();i++) //set,map出力用ループ #define inf 1e9 #define mod inf+7 #define outARY(ary) for(int i=0;i<ary.size();i++) cout<<ary[i]/* <<"\n" */; using namespace std; int main(){ //*PCK2017_4 int a,b; cin>>a>>b; int n; cin>>n; vi s(n),f(n); rep(i,0,n){ cin>>s[i]>>f[i]; } rep(i,0,n){ if (s[i]<=a&&b<=f[i]){ cout<< "1\n" ; return 0; } else if (f[i]<=a||b<=s[i]){ a*=1; } else if (s[i]<=a&&b>=f[i]){ cout<< "1\n" ; return 0; } else { cout<< "1\n" ; return 0; } } cout<< "0\n" ; //*/ /*PCK20_ //*/ return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0958 - エルの予約 |
ユーザー名 | ei2113 |
投稿日時 | 2022-09-02 15:57:16 |
言語 | C++17 |
状態 | Accepted |
得点 | 5 |
ソースコード長 | 1800 Byte |
最大実行時間 | 35 ms |
最大メモリ使用量 | 764 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 5 / 5 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in1.txt | AC | 32 ms | 604 KB |
1
|
in2.txt | AC | 20 ms | 432 KB |
1
|
in3.txt | AC | 30 ms | 648 KB |
1
|
in4.txt | AC | 19 ms | 648 KB |
1
|
in5.txt | AC | 21 ms | 620 KB |
1
|
in6.txt | AC | 22 ms | 592 KB |
1
|
in7.txt | AC | 20 ms | 560 KB |
1
|
in8.txt | AC | 16 ms | 660 KB |
1
|
in9.txt | AC | 25 ms | 628 KB |
1
|
in10.txt | AC | 20 ms | 704 KB |
1
|
in11.txt | AC | 21 ms | 548 KB |
1
|
in12.txt | AC | 35 ms | 392 KB |
1
|
in13.txt | AC | 24 ms | 496 KB |
1
|
in14.txt | AC | 25 ms | 596 KB |
1
|
in15.txt | AC | 25 ms | 568 KB |
1
|
in16.txt | AC | 23 ms | 668 KB |
1
|
in17.txt | AC | 20 ms | 516 KB |
1
|
in18.txt | AC | 30 ms | 488 KB |
1
|
in19.txt | AC | 22 ms | 592 KB |
1
|
in20.txt | AC | 20 ms | 660 KB |
1
|
in21.txt | AC | 19 ms | 764 KB |
1
|
in22.txt | AC | 24 ms | 612 KB |
1
|
in23.txt | AC | 29 ms | 580 KB |
1
|
in24.txt | AC | 18 ms | 556 KB |
1
|
in25.txt | AC | 20 ms | 660 KB |
1
|
in26.txt | AC | 20 ms | 636 KB |
1
|
in27.txt | AC | 21 ms | 480 KB |
1
|
in28.txt | AC | 31 ms | 580 KB |
1
|
in29.txt | AC | 17 ms | 548 KB |
1
|
in30.txt | AC | 16 ms | 620 KB |
1
|
in31.txt | AC | 22 ms | 588 KB |
1
|
in32.txt | AC | 22 ms | 684 KB |
1
|