結果

問題 No.431 死亡フラグ
ユーザー 14番14番
提出日時 2016-11-08 11:18:33
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 1,135 bytes
コンパイル時間 1,095 ms
コンパイル使用メモリ 113,308 KB
実行使用メモリ 19,328 KB
最終ジャッジ日時 2024-05-03 23:09:06
合計ジャッジ時間 2,294 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
19,200 KB
testcase_01 AC 29 ms
19,328 KB
testcase_02 AC 31 ms
18,944 KB
testcase_03 AC 29 ms
19,200 KB
testcase_04 AC 29 ms
19,072 KB
testcase_05 AC 30 ms
19,328 KB
testcase_06 AC 29 ms
19,072 KB
testcase_07 AC 30 ms
18,944 KB
testcase_08 AC 32 ms
18,944 KB
testcase_09 AC 31 ms
19,200 KB
testcase_10 AC 30 ms
19,200 KB
testcase_11 AC 30 ms
19,072 KB
testcase_12 AC 29 ms
19,328 KB
testcase_13 AC 30 ms
19,200 KB
testcase_14 AC 29 ms
18,944 KB
testcase_15 AC 29 ms
19,072 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;

public class Program
{
    public void Proc() {
        Reader.IsDebug = false;
        int[] inpt = Reader.ReadLine().Trim().Split(' ').Select(a=>int.Parse(a)).ToArray();
        int[] sibouflag = inpt.Take(3).ToArray();
        int seizonFlag = inpt[3];

        string ans = "DEAD";
        if(seizonFlag == 1 || sibouflag.Count(a=>a == 1) < 2) {
            ans = "SURVIVED";
        }
        Console.WriteLine(ans);

    }


    public class Reader {
        public static bool IsDebug = true;
        private static System.IO.StringReader SReader;
        private static string InitText = @"



0 1 0 0



";
        public static string ReadLine() {
            if(IsDebug) {
                if(SReader == null) {
                    SReader = new System.IO.StringReader(InitText.Trim());
                }
                return SReader.ReadLine();
            } else {
                return Console.ReadLine();
            }
        }

    }
    public static void Main(string[] args)
    {
        Program prg = new Program();
        prg.Proc();
    }
}
0