結果

問題 No.239 にゃんぱすー
ユーザー TDTD
提出日時 2022-06-07 13:12:58
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,318 bytes
コンパイル時間 856 ms
コンパイル使用メモリ 106,728 KB
実行使用メモリ 24,212 KB
最終ジャッジ日時 2023-10-21 03:49:38
合計ジャッジ時間 2,983 ms
ジャッジサーバーID
(参考情報)
judge14 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
24,144 KB
testcase_01 AC 25 ms
24,144 KB
testcase_02 AC 26 ms
24,200 KB
testcase_03 AC 26 ms
24,200 KB
testcase_04 AC 26 ms
24,204 KB
testcase_05 AC 27 ms
24,200 KB
testcase_06 AC 27 ms
24,144 KB
testcase_07 AC 26 ms
24,204 KB
testcase_08 AC 26 ms
24,204 KB
testcase_09 AC 26 ms
24,200 KB
testcase_10 AC 27 ms
24,208 KB
testcase_11 WA -
testcase_12 AC 26 ms
24,204 KB
testcase_13 AC 27 ms
24,208 KB
testcase_14 AC 26 ms
24,208 KB
testcase_15 AC 27 ms
24,204 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 27 ms
24,208 KB
testcase_21 WA -
testcase_22 AC 27 ms
24,212 KB
testcase_23 AC 27 ms
24,208 KB
testcase_24 AC 28 ms
24,212 KB
testcase_25 AC 28 ms
24,208 KB
testcase_26 WA -
testcase_27 AC 25 ms
24,204 KB
testcase_28 AC 26 ms
24,208 KB
testcase_29 AC 26 ms
24,204 KB
testcase_30 AC 26 ms
24,208 KB
testcase_31 AC 27 ms
24,208 KB
testcase_32 AC 27 ms
24,208 KB
testcase_33 WA -
testcase_34 AC 27 ms
24,212 KB
testcase_35 AC 28 ms
24,208 KB
testcase_36 AC 28 ms
24,212 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace yukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = int.Parse(Console.ReadLine());
            int[] b = new int[a];
            int c = 0;
            int d = 0;
            int ans=0;
            for(int i = 0; i < a; i++)
            {
                string[] s = Console.ReadLine().Split(' ');
                for(int j=0;j < a; j++)
                {
                    if(s[j]== "nyanpass")
                    {
                        b[j]++;
                    }
                }
            }
            for (int x = 0; x <a; x++)
            {
                if (ans != 0)
                {
                    if (b[x] > b[ans - 1])
                    {
                        ans = x + 1;
                        c = b[x];
                    }
                     if (b[x] == b[ans - 1])
                    {
                        d=b[x];
                    }
                }
                else
                {
                    if (b[x] != 0)
                    {
                        ans = x + 1;
                        c = b[x];
                    }
                }
            }
            if (ans == 0 || d==c)
                ans = -1;
            Console.WriteLine(ans);
        }
    }
}
0