結果

問題 No.239 にゃんぱすー
ユーザー mencottonmencotton
提出日時 2017-12-27 22:53:22
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 1,070 bytes
コンパイル時間 1,952 ms
コンパイル使用メモリ 102,780 KB
実行使用メモリ 24,776 KB
最終ジャッジ日時 2023-08-23 07:27:06
合計ジャッジ時間 5,878 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
22,692 KB
testcase_01 AC 57 ms
18,676 KB
testcase_02 AC 57 ms
18,788 KB
testcase_03 AC 57 ms
20,788 KB
testcase_04 AC 56 ms
20,624 KB
testcase_05 AC 56 ms
20,724 KB
testcase_06 AC 58 ms
24,776 KB
testcase_07 AC 58 ms
20,848 KB
testcase_08 AC 58 ms
20,604 KB
testcase_09 AC 60 ms
22,760 KB
testcase_10 AC 58 ms
18,792 KB
testcase_11 AC 57 ms
18,608 KB
testcase_12 AC 58 ms
20,824 KB
testcase_13 AC 58 ms
22,880 KB
testcase_14 AC 57 ms
20,652 KB
testcase_15 AC 57 ms
20,720 KB
testcase_16 AC 59 ms
22,620 KB
testcase_17 AC 59 ms
22,816 KB
testcase_18 AC 58 ms
20,716 KB
testcase_19 AC 59 ms
18,800 KB
testcase_20 AC 59 ms
20,724 KB
testcase_21 AC 60 ms
22,668 KB
testcase_22 AC 60 ms
22,768 KB
testcase_23 AC 60 ms
20,724 KB
testcase_24 AC 60 ms
22,768 KB
testcase_25 AC 60 ms
20,712 KB
testcase_26 AC 61 ms
20,648 KB
testcase_27 AC 58 ms
20,708 KB
testcase_28 AC 58 ms
22,700 KB
testcase_29 AC 58 ms
20,652 KB
testcase_30 AC 58 ms
20,628 KB
testcase_31 AC 58 ms
20,812 KB
testcase_32 AC 59 ms
20,732 KB
testcase_33 AC 59 ms
22,752 KB
testcase_34 AC 60 ms
20,552 KB
testcase_35 AC 60 ms
20,588 KB
testcase_36 AC 61 ms
20,768 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.Collections.Generic;
using System.Linq;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            bool[] ret = new bool[n];
            for (int i = 0; i < n; i++) ret[i] = true;
            for (int i = 0; i < n; i++)
            {
                string[] s = Console.ReadLine().Split();
                for (int j = 0; j < n; j++)
                {
                    if (i == j) continue;
                    else if (!(s[j] == "nyanpass" || s[j] == "-")) ret[j] = false;
                }
            }
            int a = -1;
            for (int i = 0; i < n; i++)
            {
                if (ret[i])
                {
                    if (a == -1)
                    {
                        a = i + 1;
                    }
                    else
                    {
                        a = 999;
                    }
                }
            }
            Console.WriteLine(a <= 100 ? a : -1);
        }
    }
}
0