結果
問題 | No.208 王将 |
ユーザー |
![]() |
提出日時 | 2016-03-30 19:50:08 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 388 bytes |
コンパイル時間 | 392 ms |
コンパイル使用メモリ | 56,036 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-09 16:30:13 |
合計ジャッジ時間 | 1,203 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include<iostream> #include<cstdlib> using namespace std; int main() { int x, y, x2, y2; cin >> x >> y >> x2 >> y2; if (abs(x) == abs(y)) { if (abs(x2) == abs(y2)) { if (x > x2) { cout << x + 1 << endl; } else { cout << x << endl; } } else { cout << x << endl; } } else if (x > y) { cout << x << endl; } else { cout << y << endl; } return 0; }