結果
問題 |
No.531 エヌスクミ島の平和協定
|
ユーザー |
![]() |
提出日時 | 2018-02-17 22:49:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 412 bytes |
コンパイル時間 | 621 ms |
コンパイル使用メモリ | 62,972 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 18:33:19 |
合計ジャッジ時間 | 1,569 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 36 WA * 1 |
ソースコード
#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/2 > m) && !(n<=m))|| n==m+1 ) { flag = false; }else{ if(n<=m) cout << 1 << endl; else cout << 2 << endl; } if(!flag) cout << -1 << endl; return 0; }