結果
問題 | No.531 エヌスクミ島の平和協定 |
ユーザー |
![]() |
提出日時 | 2017-06-23 23:05:24 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,139 bytes |
コンパイル時間 | 1,530 ms |
コンパイル使用メモリ | 165,524 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-19 16:21:58 |
合計ジャッジ時間 | 2,518 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 37 |
ソースコード
#include<bits/stdc++.h> #define rep(i,a,b) for(int i=a;i<b;i++) #pragma GCC optimize ("-O3") using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); } //--------------------------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------------------------- ∧_∧ ∧_∧ (´<_` ) Welcome to My Coding Space! ( ´_ゝ`) / ⌒i / \ | | / / ̄ ̄ ̄ ̄/ | __(__ニつ/ _/ .| .|____ \/____/ (u ⊃ ---------------------------------------------------------------------------------------------------*/ int N, M; //--------------------------------------------------------------------------------------------------- void _main() { cin >> N >> M; if (N <= M) printf("1\n"); else if (N % 2 == 1) printf("-1\n"); else if (N / 2 <= M) printf("2\n"); else printf("-1\n"); }