結果

問題 No.431 死亡フラグ
ユーザー jzn
提出日時 2019-02-11 14:13:45
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 497 bytes
コンパイル時間 431 ms
コンパイル使用メモリ 54,508 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-18 09:44:31
合計ジャッジ時間 1,090 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

int main()
{
    int D[3];
    int S;
    
    for(int i=0; i<3; i++)
    {
        std::cin >> D[i];
    }
    
    std::cin >> S;
    
    D[0] = D[0]+D[1]+D[2];
    
    
    if(S==0)
    {
        if(D[0]>=2)
        {
            std::cout << "DEAD" << std::endl;
        }
        else if(D[0]<2)
        {
            std::cout << "SURVIVED" << std::endl;
        } 
    }
    else if(S==1)
    {
        std::cout << "SURVIVED" << std::endl;
    }
    
    return 0;
}
0