Submission #15710


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import java.util.Arrays;
import java.util.Scanner;
import java.util.function.IntConsumer;
import java.util.function.LongSupplier;
import java.util.stream.IntStream;
public class Main{
static final Scanner s=new Scanner(System.in);
static final long[] fal_rnd(long[] ar,LongSupplier sp){
int l=-1,r=ar.length;
while(l+1!=r)
ar[Math.random()<0.5?++l:--r]=sp.getAsLong();
return ar;
}
static final void FOR(int t,IntConsumer i){
for(int v=0;v<t;v++)i.accept(v);
}
static final void RFOR(int t,IntConsumer i){
for(int v=t-1;v>=0;v--)i.accept(v);
}
static final IntStream FORS(int v){return IntStream.rangeClosed(0, v);};
public static void main(String[] __){
int n=s.nextInt();
String in=s.next();
System.out.println(FORS(n).mapToLong(i->Arrays.stream(s.nextLine().split(" ")).filter(in::equals).count()).sum());
}
}

ステータス

項目 データ
問題 0003 - 聖書
ユーザー名 fal_rnd
投稿日時 2017-04-27 12:03:53
言語 Java
状態 Accepted
得点 5
ソースコード長 871 Byte
最大実行時間 131 ms
最大メモリ使用量 16684 KB

セット

セット 得点 Cases
1 ALL 3 / 3 *
2 SUB1 1 / 1 Alice_in1.txt
3 SUB2 1 / 1 Alice_in2.txt

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Alice_in1.txt AC 131 ms 16684 KB
1
2
Alice_in2.txt AC 102 ms 16580 KB
1
3
Alice_in3.txt AC 125 ms 16556 KB
1