結果
問題 | No.977 アリス仕掛けの摩天楼 |
ユーザー |
![]() |
提出日時 | 2020-02-01 00:12:50 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,183 bytes |
コンパイル時間 | 2,633 ms |
コンパイル使用メモリ | 99,484 KB |
実行使用メモリ | 10,124 KB |
最終ジャッジ日時 | 2023-10-17 14:09:56 |
合計ジャッジ時間 | 2,590 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 4 ms
6,188 KB |
testcase_01 | AC | 4 ms
6,188 KB |
testcase_02 | AC | 4 ms
6,188 KB |
testcase_03 | AC | 5 ms
6,188 KB |
testcase_04 | AC | 5 ms
6,188 KB |
testcase_05 | AC | 4 ms
6,188 KB |
testcase_06 | AC | 5 ms
6,188 KB |
testcase_07 | AC | 4 ms
6,188 KB |
testcase_08 | AC | 4 ms
6,188 KB |
testcase_09 | AC | 5 ms
6,188 KB |
testcase_10 | WA | - |
testcase_11 | AC | 5 ms
6,188 KB |
testcase_12 | AC | 4 ms
6,188 KB |
testcase_13 | AC | 10 ms
6,692 KB |
testcase_14 | AC | 10 ms
6,692 KB |
testcase_15 | AC | 10 ms
6,956 KB |
testcase_16 | AC | 10 ms
6,692 KB |
testcase_17 | AC | 11 ms
7,220 KB |
testcase_18 | AC | 27 ms
7,484 KB |
testcase_19 | WA | - |
testcase_20 | AC | 42 ms
8,276 KB |
testcase_21 | AC | 68 ms
8,804 KB |
testcase_22 | AC | 89 ms
9,332 KB |
testcase_23 | AC | 101 ms
10,124 KB |
testcase_24 | AC | 95 ms
10,124 KB |
testcase_25 | AC | 98 ms
10,124 KB |
ソースコード
#include <iostream> #include <string> #include <vector> #include <deque> #include <queue> #include <algorithm> #include <set> #include <map> #include <bitset> #include <cmath> #include <functional> #include <iomanip> #define vll vector<ll> #define vvv vector<vvl> #define vvi vector<vector<int> > #define vvl vector<vector<ll> > #define vv(a, b, c, d) vector<vector<d> >(a, vector<d>(b, c)) #define vvvl(a, b, c, d) vector<vvl>(a, vvl(b, vll (c, d))); #define rep(c, a, b) for(ll c=a;c<b;c++) #define re(c, b) for(ll c=0;c<b;c++) #define all(obj) (obj).begin(), (obj).end() typedef long long int ll; typedef long double ld; using namespace std; vvl G = vv(100001, 0, 0, ll); vll use(100001, 0); void dfs(ll now, ll from){ if(use[now]) return ; use[now] = 1; for(int i=0;i<G[now].size();i++){ if(G[now][i]==from) continue; dfs(G[now][i], now); } } int main(int argc, char const *argv[]) { ll a, b, n;std::cin >> n; re(i, n-1){ std::cin >> a >> b; G[a].push_back(b); G[b].push_back(a); } dfs(0, -1); for(int i=0;i<n;i++){ if(!use[i]){ std::cout << "Alice" << '\n'; return 0; } } std::cout << "Bob" << '\n'; return 0; }