結果
| 問題 |
No.431 死亡フラグ
|
| コンテスト | |
| ユーザー |
小指が強い人
|
| 提出日時 | 2016-10-14 12:46:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 355 bytes |
| コンパイル時間 | 1,342 ms |
| コンパイル使用メモリ | 158,192 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-22 06:00:25 |
| 合計ジャッジ時間 | 2,052 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 3 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:11:12: warning: ‘ds’ may be used uninitialized in this function [-Wmaybe-uninitialized]
11 | ds += d;
| ~~~^~~~
ソースコード
#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;
}
小指が強い人