結果
| 問題 |
No.208 王将
|
| コンテスト | |
| ユーザー |
はまやんはまやん
|
| 提出日時 | 2016-04-22 18:01:49 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 281 bytes |
| コンパイル時間 | 1,195 ms |
| コンパイル使用メモリ | 157,660 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-09 16:30:20 |
| 合計ジャッジ時間 | 1,990 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;i++)
int main()
{
int x, y; cin >> x >> y;
int x2, y2; cin >> x2 >> y2;
int ans = max(x, y);
if (x == y && x2 == y2)
{
if (min(x, 0) < x2 && x2 < max(x, 0)) ans++;
}
cout << ans << endl;
}
はまやんはまやん