結果
問題 |
No.208 王将
|
ユーザー |
![]() |
提出日時 | 2023-11-06 22:44:25 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 521 bytes |
コンパイル時間 | 2,347 ms |
コンパイル使用メモリ | 191,228 KB |
最終ジャッジ日時 | 2025-02-17 19:50:22 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> #include<iostream> #include<iomanip> #include<string> #include<algorithm> #include<vector> #include<set> #include<list> #include<queue> #include<math.h> #include<bitset> using ll = long long; using namespace std; int main(){ int x, y, x2, y2; cin >> x >> y >> x2 >> y2; if (abs(x)==abs(y) && abs(x2)==abs(y2) && abs(x)*y2 == abs(x2)*y && x*abs(y2)==x2*abs(y) && abs(x) > abs(x2)){ cout << max(abs(x), abs(y)) + 1 << endl; } else cout << max(abs(x), abs(y)) << endl; }