結果
| 問題 | No.531 エヌスクミ島の平和協定 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-27 00:08:03 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 255 bytes |
| コンパイル時間 | 477 ms |
| コンパイル使用メモリ | 62,872 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-05 12:16:12 |
| 合計ジャッジ時間 | 1,549 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 WA * 13 |
コンパイルメッセージ
main.cpp: In function 'int solve(int, int)':
main.cpp:17:1: warning: control reaches end of non-void function [-Wreturn-type]
17 | }
| ^
ソースコード
#include <iostream>
using namespace std;
int solve(int n, int m) {
if (n <= m) {
return 1;
}
if (n % 2 != 0) {
return -1;
}
if (n / 2 <= m) {
return 2;
}
}
int main () {
int n, m;
cin >> n >> m;
cout << solve(n, m) << endl;
}