結果
| 問題 |
No.643 Two Operations No.2
|
| コンテスト | |
| ユーザー |
eSeF
|
| 提出日時 | 2020-02-18 21:46:05 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 440 bytes |
| コンパイル時間 | 1,970 ms |
| コンパイル使用メモリ | 191,412 KB |
| 最終ジャッジ日時 | 2025-01-09 01:04:56 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;
const int MOD = ((int)1e9)+7;
const int INF = (int)(1e9)+(int)(1e7);
const ll INFL = (ll)(1e18)+INF;
const double EPS = 1e-8;
using namespace std;
int main()
{
int X,Y;
cin >> X >> Y;
int ans;
if(X==Y)ans=0;
else if(Y==0)ans=1;
else if(X==0)ans=2;
else if(X==-Y)ans=3;
else ans=-1;
cout << ans << endl;
return 0;
}
eSeF