結果
問題 |
No.531 エヌスクミ島の平和協定
|
ユーザー |
![]() |
提出日時 | 2018-02-17 22:40:08 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 388 bytes |
コンパイル時間 | 714 ms |
コンパイル使用メモリ | 62,840 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-24 12:22:12 |
合計ジャッジ時間 | 1,901 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 28 WA * 9 |
ソースコード
#include<iostream> #include<string> #include<vector> #include <algorithm> #include <cmath> using namespace std; int n, m, cnt; bool flag = true; int main() { cin >> n >> m; if((n!=1&&m==1) || (n==3&&m==2) || n-m > 3 ) { flag = false; }else{ if(n==m) cout << 1 << endl; else cout << 2 << endl; } if(!flag) cout << -1 << endl; return 0; }