結果
| 問題 |
No.24 数当てゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-06 18:46:55 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 688 bytes |
| コンパイル時間 | 2,777 ms |
| コンパイル使用メモリ | 77,592 KB |
| 実行使用メモリ | 54,508 KB |
| 最終ジャッジ日時 | 2024-07-17 21:26:02 |
| 合計ジャッジ時間 | 4,634 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 10 |
ソースコード
import java.util.*;
class N024{
public static void main(String args[]){
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int e[] = new int[10];
int count;
for(int i = 0; i < n; i++){
int a = s.nextInt();
int b = s.nextInt();
int c = s.nextInt();
int d = s.nextInt();
String r = s.next();
if(r.equals("YES")){
count = 1;
}else{
count = -1;
}
e[a] += count;
e[b] += count;
e[c] += count;
e[d] += count;
}
int max = 0;
for(int i = 0; i < e.length; i++){
System.out.println(e[i]);
max = Math.max(max , e[i]);
}
for(int i = 0; i < e.length; i++){
if(e[i] == max){
System.out.println(i);
}
}
}
}