結果
問題 | No.1829 Möbius Tunnelling |
ユーザー |
![]() |
提出日時 | 2022-02-04 21:41:12 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,458 bytes |
コンパイル時間 | 3,707 ms |
コンパイル使用メモリ | 158,692 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-11 11:37:34 |
合計ジャッジ時間 | 4,648 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <iostream> //swap() #include <fstream> #include <string> //size(), substr(l, r) 部分文字列(rは省略可能) など S[i]で取り出した文字も string 型になる. #include <cmath> //abs 絶対値, sin cos tan 三角関数 など. #include <algorithm> //min(), max() など. ※__gcd()は使えないがc++17なのでgcd(), lcm()が使用可能 #include <queue> #include <vector> #include <set> #include <atcoder/all> //AtCoder Library using namespace std; using namespace atcoder; typedef long long ll; //イテレーション #define REP(i,n) for(ll i=0;i<ll(n);i++) #define REPD(i,n) for(ll i=n-1;i>=0;i--) #define FOR(i,a,b) for(ll i=a;i<=ll(b);i++) #define FORD(i,a,b) for(ll i=a;i>=ll(b);i--) #define FORA(i,I) for(const auto& i:I) //const(定数)参照 型推論 iを変数として定義,Iはforが処理すべき値の範囲.Python3 の in 演算子を使った for 文みたいな. //aをbで割る時の繰上げ,繰り下げ ll myceil(ll a,ll b){return (a+(b-1))/b;} ll myfloor(ll a,ll b){return a/b;} //------------------------------------------------------------------------------------------------- int main(){ int N, A, B, C; cin >> N; cin >> A >> B >> C; if(A==C){cout << "No" << endl; return 0;} if(A>B){A = N - A + 1; B = N - B + 1; C = N - C + 1;} if(A<C){cout << "Yes" << endl; return 0;} cout << "No" << endl; return 0; } //コンパイル //g++ -o _ _.cpp -std=c++17 -I ../../ac-library