結果
| 問題 | No.977 アリス仕掛けの摩天楼 |
| コンテスト | |
| ユーザー |
C_nena_E
|
| 提出日時 | 2020-01-31 21:52:59 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 656 bytes |
| 記録 | |
| コンパイル時間 | 1,728 ms |
| コンパイル使用メモリ | 81,972 KB |
| 実行使用メモリ | 56,996 KB |
| 最終ジャッジ日時 | 2026-04-06 04:36:43 |
| 合計ジャッジ時間 | 7,279 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 WA * 6 |
ソースコード
import java.util.*;
import java.io.*;
import java.math.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
if(N == 2){
System.out.println("Alice");
return;
}
int[] map = new int[N];
for(int i = 0; i < N-1; i++){
map[sc.nextInt()]++;
map[sc.nextInt()]++;
}
for(int i = 0; i < N; i++){
if(map[i] == 0){
System.out.println("Alice");
return;
}
}
System.out.println("Bob");
}
}
C_nena_E