結果
| 問題 |
No.208 王将
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-07-22 23:01:48 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 795 bytes |
| コンパイル時間 | 558 ms |
| コンパイル使用メモリ | 91,360 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-08 12:08:04 |
| 合計ジャッジ時間 | 1,429 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 WA * 3 |
ソースコード
#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)){
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;
}