結果
問題 |
No.531 エヌスクミ島の平和協定
|
ユーザー |
![]() |
提出日時 | 2017-06-29 17:51:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 507 bytes |
コンパイル時間 | 712 ms |
コンパイル使用メモリ | 87,480 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-05 12:19:27 |
合計ジャッジ時間 | 2,080 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 36 WA * 1 |
ソースコード
#include<iostream> #include<algorithm> #include<cstdio> #include<cstdlib> #include<vector> #include<string> #include<sstream> #include<cmath> #include<numeric> #include<map> #include<stack> #include<queue> #include<list> using namespace std; int inf = 1000000000; int main(void) { int n, m; cin >> n >> m; if( n <= m ){ cout << 1 << endl; return 0; } if( n % 2 == 1 || m == 1 || n > 2 * m ){ cout << -1 << endl; return 0; } cout << n / m << endl; return 0; } // EOF