結果

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

テストケース

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

ソースコード

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++;
  cout << ((cnt > 1) ? "Alice" : "Bob") << "\n";
}
0