結果
| 問題 |
No.431 死亡フラグ
|
| コンテスト | |
| ユーザー |
14番
|
| 提出日時 | 2016-11-08 11:18:33 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 1,135 bytes |
| コンパイル時間 | 1,752 ms |
| コンパイル使用メモリ | 107,776 KB |
| 実行使用メモリ | 19,200 KB |
| 最終ジャッジ日時 | 2024-11-25 04:38:53 |
| 合計ジャッジ時間 | 2,418 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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();
}
}
14番