結果

問題 No.977 アリス仕掛けの摩天楼
ユーザー ninoinuininoinui
提出日時 2020-01-31 22:49:02
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 385 bytes
コンパイル時間 1,644 ms
コンパイル使用メモリ 171,024 KB
実行使用メモリ 8,924 KB
最終ジャッジ日時 2023-10-17 11:29:32
合計ジャッジ時間 3,370 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 2 ms
4,348 KB
testcase_09 WA -
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 8 ms
4,348 KB
testcase_14 AC 9 ms
4,348 KB
testcase_15 AC 9 ms
4,348 KB
testcase_16 AC 8 ms
4,348 KB
testcase_17 AC 8 ms
4,348 KB
testcase_18 AC 24 ms
4,920 KB
testcase_19 AC 24 ms
4,920 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 86 ms
8,880 KB
testcase_25 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  vector<vector<int>> G(N);
  for (int i = 0, a, b; cin >> a >> b; i++)
    G.at(a).push_back(b), G.at(b).push_back(a);
  int cnt = 0;
  for (int i = 0; i < G.size(); i++) {
    if (!G.at(i).size()) cnt += 2;
    else if (G.at(i).size() == 1) cnt++;
  }
  cout << ((cnt > 2) ? "Alice" : "Bob") << "\n";
}
0