結果
問題 | No.208 王将 |
ユーザー |
![]() |
提出日時 | 2015-05-15 23:25:16 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 925 bytes |
コンパイル時間 | 801 ms |
コンパイル使用メモリ | 86,096 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-09 16:22:03 |
合計ジャッジ時間 | 1,660 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <iostream> #include <vector> #include <deque> #include <stack> #include <memory> #include <functional> #include <algorithm> #include <map> #include <list> #include <complex> #include <string> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <numeric> #include <array> using namespace std; typedef std::pair<int, int> pii; typedef long long int ll; #define pb push_back int dx[9] {-1, 0, 1, -1, 0, 1, -1, 0, 1}; int dy[9] {1, 1, 1, 0, 0, 0, -1, -1, -1}; int main(){ int x, y; int mx ,my; cin >> x >> y; cin >> mx >> my; int max_xy = max(x,y); int min_xy = min(x,y); int max_mxy = max(mx,my); int min_mxy = min(mx,my); if(max_xy == min_xy) { if(max_mxy == min_mxy && max_xy > max_mxy){ std::cout << max_xy + 1 << std::endl; return 0; }else{ std::cout << max_xy << std::endl; return 0; } }else{ std::cout << max_xy << std::endl; } return 0; }