結果

問題 No.239 にゃんぱすー
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-07-10 09:52:38
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 793 bytes
コンパイル時間 2,010 ms
コンパイル使用メモリ 102,600 KB
実行使用メモリ 24,844 KB
最終ジャッジ日時 2023-09-26 13:52:38
合計ジャッジ時間 5,930 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 57 ms
20,792 KB
testcase_05 AC 56 ms
22,824 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 58 ms
22,720 KB
testcase_09 WA -
testcase_10 AC 59 ms
20,800 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 58 ms
20,620 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 61 ms
18,720 KB
testcase_21 WA -
testcase_22 AC 62 ms
22,796 KB
testcase_23 AC 61 ms
22,720 KB
testcase_24 AC 62 ms
22,724 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 59 ms
20,720 KB
testcase_28 RE -
testcase_29 WA -
testcase_30 AC 59 ms
20,760 KB
testcase_31 RE -
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 61 ms
20,680 KB
testcase_35 WA -
testcase_36 AC 63 ms
22,728 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;

class No239{
    static void Main(){
        var n=Int32.Parse(Console.ReadLine());
        var list=new List<int>();
        for(int i=0;i<n;++i){
            var b=Console.ReadLine().Split(' ');
            for(int j=0;j<n;++j){
                if(b[j]=="nyanpass"){
                    list.Add((i+1)*1000+j+1);
                }
            }
        }
        var a=0;
        if(list[0]!=0){
            a=list[0]/1000;
            for(int k=1;k<list.Count;++k){
                if(a==(list[k]/1000))continue;
                else if(a!=(list[k]%1000)){
                    a=-1;
                    break;
                }
            }
        }else{
            a=-1;
        }
        Console.WriteLine(a);
    }
}
0