結果
問題 | No.208 王将 |
ユーザー |
|
提出日時 | 2015-07-22 23:02:34 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 815 bytes |
コンパイル時間 | 919 ms |
コンパイル使用メモリ | 91,624 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-09 16:26:27 |
合計ジャッジ時間 | 1,840 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 WA * 1 |
ソースコード
#include <cstdio> #include <iostream> #include <sstream> #include <fstream> #include <iomanip> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <list> #include <queue> #include <stack> #include <set> #include <map> #include <bitset> #include <numeric> #include <limits> #include <climits> #include <cfloat> #include <functional> using namespace std; int main() { long long x, y, x2, y2; cin >> x >> y >> x2 >> y2; long long ans = max(x, y); if(abs(x) == abs(y) && abs(x) > abs(x2)){ if(x != 0) x /= abs(x); if(y != 0) y /= abs(y); if(x2 != 0) x2 /= abs(x2); if(y2 != 0) y2 /= abs(y2); if(x == x2 && y == y2) ++ ans; } cout << ans << endl; return 0; }