結果
問題 | No.208 王将 |
ユーザー |
![]() |
提出日時 | 2020-10-22 01:22:58 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 416 bytes |
コンパイル時間 | 1,942 ms |
コンパイル使用メモリ | 193,940 KB |
最終ジャッジ日時 | 2025-01-15 12:22:18 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; const std::vector<int> dx = {1, -1, 0, 0, 1, 1, -1, -1}, dy = {0, 0, 1, -1, 1, -1, 1, -1}; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int gx, gy, ngx, ngy; cin >> gx >> gy >> ngx >> ngy; if (ngx < gx && ngy < gy && ngx == ngy && gx == gy) { cout << max(gx, gy) + 1 << '\n'; } else { cout << max(gx, gy) << '\n'; } return 0; }