結果
問題 | No.531 エヌスクミ島の平和協定 |
ユーザー |
![]() |
提出日時 | 2018-09-28 22:24:34 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 427 bytes |
コンパイル時間 | 903 ms |
コンパイル使用メモリ | 53,984 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 06:48:55 |
合計ジャッジ時間 | 1,755 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 37 |
ソースコード
#include<iostream>using namespace std;int main(){int n,m,result;cin >> n;cin >> m;if((n%2) == 1){if(n <= m){result = 1;}else{result = -1;}}else{if(n <= m){result = 1;}else if((n/2) <= m){result = 2;}else{result = -1;}}cout << result << endl;return 0;}