結果

問題 No.239 にゃんぱすー
ユーザー fal_rndfal_rnd
提出日時 2017-08-08 17:43:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 221 ms / 2,000 ms
コード長 890 bytes
コンパイル時間 2,357 ms
コンパイル使用メモリ 84,284 KB
実行使用メモリ 58,376 KB
最終ジャッジ日時 2024-04-20 05:11:17
合計ジャッジ時間 9,695 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
53,124 KB
testcase_01 AC 121 ms
54,124 KB
testcase_02 AC 107 ms
53,368 KB
testcase_03 AC 125 ms
53,968 KB
testcase_04 AC 108 ms
52,968 KB
testcase_05 AC 110 ms
53,176 KB
testcase_06 AC 105 ms
52,936 KB
testcase_07 AC 127 ms
54,128 KB
testcase_08 AC 129 ms
54,144 KB
testcase_09 AC 128 ms
54,064 KB
testcase_10 AC 138 ms
54,180 KB
testcase_11 AC 155 ms
54,400 KB
testcase_12 AC 167 ms
54,784 KB
testcase_13 AC 169 ms
54,572 KB
testcase_14 AC 181 ms
54,740 KB
testcase_15 AC 183 ms
54,588 KB
testcase_16 AC 169 ms
54,428 KB
testcase_17 AC 190 ms
54,432 KB
testcase_18 AC 191 ms
56,564 KB
testcase_19 AC 178 ms
56,244 KB
testcase_20 AC 191 ms
57,084 KB
testcase_21 AC 192 ms
57,084 KB
testcase_22 AC 202 ms
57,840 KB
testcase_23 AC 202 ms
56,896 KB
testcase_24 AC 216 ms
57,896 KB
testcase_25 AC 221 ms
58,372 KB
testcase_26 AC 212 ms
58,232 KB
testcase_27 AC 130 ms
54,108 KB
testcase_28 AC 155 ms
54,788 KB
testcase_29 AC 165 ms
54,532 KB
testcase_30 AC 168 ms
54,564 KB
testcase_31 AC 179 ms
54,488 KB
testcase_32 AC 181 ms
56,372 KB
testcase_33 AC 189 ms
57,024 KB
testcase_34 AC 199 ms
57,068 KB
testcase_35 AC 220 ms
58,024 KB
testcase_36 AC 215 ms
58,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main{
	static Scanner s=new Scanner(System.in);
	static int getInt(){return Integer.parseInt(s.next());}
	static IntStream REPS(int v){return IntStream.range(0,v);}
	static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);}
	static IntStream INS(int n) {return REPS(n).map(i->getInt());}
	static class Pair<T,U>{
		T l;U r;
		Pair(T L,U R){l=L;r=R;}
		T getL(){return l;}
		U getR(){return r;}
	}

	public static void main(String[]$){
		int n=getInt();
		List<Integer>r=REPS(1,n).boxed().collect(Collectors.toList());

		for(int l=0;l<n;++l) for(int i=1;i<=n;++i){
			String in=s.next();
			if(!(in.equals("-")||in.equals("nyanpass"))) {
				r.remove(Integer.valueOf(i));
			}
		}
		System.out.println(
				r.size()==1?r.get(0):-1
				);
	}
}
0