結果
| 問題 |
No.531 エヌスクミ島の平和協定
|
| コンテスト | |
| ユーザー |
mine691
|
| 提出日時 | 2018-07-04 16:29:07 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 157 bytes |
| コンパイル時間 | 470 ms |
| コンパイル使用メモリ | 63,820 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-01 02:12:59 |
| 合計ジャッジ時間 | 1,613 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 6 WA * 31 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:6:9: warning: 'n' is used uninitialized [-Wuninitialized]
6 | if(n<=m)printf("1\n");
| ^~
main.cpp:5:13: note: 'n' was declared here
5 | int n,m;
| ^
main.cpp:6:9: warning: 'm' is used uninitialized [-Wuninitialized]
6 | if(n<=m)printf("1\n");
| ^~
main.cpp:5:15: note: 'm' was declared here
5 | int n,m;
| ^
ソースコード
#include<iostream>
using namespace std;
int main(){
int n,m;
if(n<=m)printf("1\n");
else {
if(n%2==0&&n>=n/2)printf("2\n");
else printf("-1\n");
}
}
mine691