結果
問題 | No.208 王将 |
ユーザー |
![]() |
提出日時 | 2016-02-02 15:04:21 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 264 bytes |
コンパイル時間 | 1,357 ms |
コンパイル使用メモリ | 159,264 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-09 16:29:34 |
合計ジャッジ時間 | 2,195 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ long long x,y; cin >> x >> y; long long x2,y2; cin >> x2 >> y2; long long ans; if(x != y) ans = max(x,y); else if(x2 < x and x2 == y2) ans = x + 1; else ans = x; cout << ans << endl; return 0; }