結果

問題 No.431 死亡フラグ
ユーザー 14番14番
提出日時 2016-11-08 11:18:33
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 57 ms / 2,000 ms
コード長 1,135 bytes
コンパイル時間 2,532 ms
コンパイル使用メモリ 105,124 KB
実行使用メモリ 23,884 KB
最終ジャッジ日時 2023-08-16 14:51:37
合計ジャッジ時間 4,349 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
21,892 KB
testcase_01 AC 57 ms
19,896 KB
testcase_02 AC 54 ms
21,712 KB
testcase_03 AC 55 ms
23,692 KB
testcase_04 AC 53 ms
21,796 KB
testcase_05 AC 54 ms
21,864 KB
testcase_06 AC 54 ms
21,792 KB
testcase_07 AC 52 ms
23,844 KB
testcase_08 AC 53 ms
21,844 KB
testcase_09 AC 54 ms
21,804 KB
testcase_10 AC 56 ms
21,736 KB
testcase_11 AC 53 ms
23,884 KB
testcase_12 AC 54 ms
21,992 KB
testcase_13 AC 54 ms
21,712 KB
testcase_14 AC 56 ms
21,876 KB
testcase_15 AC 55 ms
22,036 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