結果

問題 No.239 にゃんぱすー
ユーザー fal_rndfal_rnd
提出日時 2017-08-08 17:44:29
言語 Java19
(openjdk 21)
結果
AC  
実行時間 223 ms / 2,000 ms
コード長 895 bytes
コンパイル時間 2,418 ms
コンパイル使用メモリ 81,532 KB
実行使用メモリ 59,896 KB
最終ジャッジ日時 2023-08-02 05:10:27
合計ジャッジ時間 10,382 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,416 KB
testcase_01 AC 124 ms
57,588 KB
testcase_02 AC 124 ms
55,316 KB
testcase_03 AC 124 ms
55,380 KB
testcase_04 AC 123 ms
55,480 KB
testcase_05 AC 124 ms
55,508 KB
testcase_06 AC 126 ms
55,772 KB
testcase_07 AC 126 ms
55,696 KB
testcase_08 AC 129 ms
55,308 KB
testcase_09 AC 133 ms
55,376 KB
testcase_10 AC 167 ms
56,188 KB
testcase_11 AC 171 ms
56,624 KB
testcase_12 AC 171 ms
56,768 KB
testcase_13 AC 174 ms
56,280 KB
testcase_14 AC 179 ms
56,580 KB
testcase_15 AC 183 ms
55,688 KB
testcase_16 AC 173 ms
56,648 KB
testcase_17 AC 193 ms
58,480 KB
testcase_18 AC 186 ms
58,592 KB
testcase_19 AC 190 ms
59,244 KB
testcase_20 AC 193 ms
58,780 KB
testcase_21 AC 201 ms
58,748 KB
testcase_22 AC 204 ms
59,012 KB
testcase_23 AC 211 ms
59,368 KB
testcase_24 AC 215 ms
59,360 KB
testcase_25 AC 222 ms
59,604 KB
testcase_26 AC 223 ms
59,896 KB
testcase_27 AC 127 ms
55,684 KB
testcase_28 AC 167 ms
56,436 KB
testcase_29 AC 174 ms
56,312 KB
testcase_30 AC 185 ms
55,680 KB
testcase_31 AC 180 ms
56,156 KB
testcase_32 AC 192 ms
58,548 KB
testcase_33 AC 196 ms
58,660 KB
testcase_34 AC 201 ms
58,868 KB
testcase_35 AC 216 ms
59,672 KB
testcase_36 AC 221 ms
59,348 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