結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
54,068 KB
testcase_01 AC 112 ms
54,268 KB
testcase_02 AC 105 ms
52,880 KB
testcase_03 AC 117 ms
54,216 KB
testcase_04 AC 121 ms
53,996 KB
testcase_05 AC 114 ms
53,988 KB
testcase_06 AC 117 ms
53,880 KB
testcase_07 AC 108 ms
52,868 KB
testcase_08 AC 127 ms
54,272 KB
testcase_09 AC 130 ms
54,428 KB
testcase_10 AC 134 ms
54,244 KB
testcase_11 AC 157 ms
54,720 KB
testcase_12 AC 160 ms
54,516 KB
testcase_13 AC 162 ms
54,544 KB
testcase_14 AC 166 ms
54,524 KB
testcase_15 AC 168 ms
54,564 KB
testcase_16 AC 175 ms
54,828 KB
testcase_17 AC 173 ms
54,448 KB
testcase_18 AC 173 ms
56,788 KB
testcase_19 AC 185 ms
56,748 KB
testcase_20 AC 201 ms
56,940 KB
testcase_21 AC 203 ms
56,876 KB
testcase_22 AC 189 ms
57,180 KB
testcase_23 AC 198 ms
56,940 KB
testcase_24 AC 218 ms
58,320 KB
testcase_25 AC 204 ms
58,240 KB
testcase_26 AC 205 ms
58,088 KB
testcase_27 AC 126 ms
54,364 KB
testcase_28 AC 130 ms
54,040 KB
testcase_29 AC 157 ms
54,752 KB
testcase_30 AC 166 ms
54,612 KB
testcase_31 AC 168 ms
54,732 KB
testcase_32 AC 181 ms
56,968 KB
testcase_33 AC 188 ms
56,760 KB
testcase_34 AC 189 ms
56,928 KB
testcase_35 AC 200 ms
57,984 KB
testcase_36 AC 233 ms
58,364 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?(int)r.get(0):-1
				);
	}
}
0