結果
| 問題 | No.431 死亡フラグ |
| コンテスト | |
| ユーザー |
小指が強い人
|
| 提出日時 | 2016-10-14 12:46:43 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 1,085 ms |
| コンパイル使用メモリ | 174,724 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-16 09:22:34 |
| 合計ジャッジ時間 | 1,996 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 WA * 4 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:11:12: warning: 'ds' is used uninitialized [-Wuninitialized]
11 | ds += d;
| ~~~^~~~
main.cpp:6:9: note: 'ds' was declared here
6 | int ds,s;
| ^~
ソースコード
#include "bits/stdc++.h"
using namespace std;
int main(void)
{
int ds,s;
for(int i = 0; i < 3; i++) {
int d;
cin >> d;
ds += d;
}
cin >> s;
string res;
if(ds < 2 || s) {
res = "SURVIVED";
}
else {
res = "DEAD";
}
cout << res << endl;
return 0;
}
小指が強い人