結果

問題 No.1829 Möbius Tunnelling
ユーザー Spalits00Spalits00
提出日時 2022-02-04 21:41:12
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,458 bytes
コンパイル時間 2,874 ms
コンパイル使用メモリ 121,348 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-02 04:38:33
合計ジャッジ時間 3,751 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,384 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 1 ms
4,384 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 1 ms
4,384 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 1 ms
4,384 KB
testcase_17 AC 2 ms
4,384 KB
testcase_18 AC 1 ms
4,376 KB
testcase_19 AC 2 ms
4,500 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 AC 2 ms
4,384 KB
testcase_24 AC 1 ms
4,380 KB
testcase_25 AC 1 ms
4,376 KB
testcase_26 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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
0