結果

問題 No.431 死亡フラグ
ユーザー arrows
提出日時 2017-01-20 03:08:36
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 394 bytes
コンパイル時間 632 ms
コンパイル使用メモリ 72,340 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-23 02:39:37
合計ジャッジ時間 1,291 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;

int main()
{
    vector<int> D{3};
    int S;
    cin >> D[0] >> D[1] >> D[2] >> S;
    if (S == 1) {
        cout << "SURVIVED" << endl;
    } else {
        cout << (accumulate(D.begin(), D.end(), 0) >= 2 ?
                 "DEAD" : "SURVIVED") << endl;        
    }       
    return 0;
}
0