結果
問題 | No.531 エヌスクミ島の平和協定 |
ユーザー |
|
提出日時 | 2018-04-28 15:24:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 328 bytes |
コンパイル時間 | 630 ms |
コンパイル使用メモリ | 63,412 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 18:36:36 |
合計ジャッジ時間 | 1,646 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 37 |
ソースコード
#include<iostream>using namespace std;int main(){int n , m;cin >> n >> m;int res = 0;if(m >= n){res = 1;}else if(n%2 == 0){if(m >= (n/2)){res = 2;}else{res = -1;}}else{res = -1;}cout << res << endl;return 0;}