結果
| 問題 | No.431 死亡フラグ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-02 22:15:50 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 498 bytes |
| 記録 | |
| コンパイル時間 | 1,637 ms |
| コンパイル使用メモリ | 165,148 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-22 08:09:49 |
| 合計ジャッジ時間 | 2,194 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 WA * 4 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:11:9: warning: 'd' is used uninitialized [-Wuninitialized]
11 | if (d == 1) { cout << "SURVIVED\n"; return 0; }
| ^~
main.cpp:10:17: note: 'd' was declared here
10 | ll a, b, c, d, cnt = 0;
| ^
main.cpp:12:9: warning: 'a' may be used uninitialized [-Wmaybe-uninitialized]
12 | if (a == 1) { cnt++; }
| ^~
main.cpp:10:8: note: 'a' was declared here
10 | ll a, b, c, d, cnt = 0;
| ^
main.cpp:13:9: warning: 'b' may be used uninitialized [-Wmaybe-uninitialized]
13 | if (b == 1) { cnt++; }
| ^~
main.cpp:10:11: note: 'b' was declared here
10 | ll a, b, c, d, cnt = 0;
| ^
main.cpp:14:9: warning: 'c' may be used uninitialized [-Wmaybe-uninitialized]
14 | if (c == 1) { cnt++; }
| ^~
main.cpp:10:14: note: 'c' was declared here
10 | ll a, b, c, d, cnt = 0;
| ^
ソースコード
#include<bits/stdc++.h>
#define rep(i, x) for(ll i = 0; i < x; i++)
#define rep2(i, x) for(ll i = 1; i <= x; i++)
#define all(a) (a).begin(),(a).end()
using ll = long long;
using ld = long double;
const ll INF = 10000000000000000;
using namespace std;
signed main() {
ll a, b, c, d, cnt = 0;
if (d == 1) { cout << "SURVIVED\n"; return 0; }
if (a == 1) { cnt++; }
if (b == 1) { cnt++; }
if (c == 1) { cnt++; }
if (cnt >= 2) { cout << "DEAD\n"; }
else { cout << "SURVIVED\n"; }
return 0;
}