結果

問題 No.1928 Make a Binary Tree
ユーザー sahiyasahiya
提出日時 2022-05-06 22:35:00
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,497 bytes
コンパイル時間 2,249 ms
コンパイル使用メモリ 136,744 KB
実行使用メモリ 14,816 KB
最終ジャッジ日時 2023-09-20 03:37:44
合計ジャッジ時間 8,460 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
8,076 KB
testcase_01 WA -
testcase_02 AC 5 ms
7,964 KB
testcase_03 AC 5 ms
8,040 KB
testcase_04 WA -
testcase_05 AC 5 ms
8,124 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 56 ms
14,336 KB
testcase_37 WA -
testcase_38 AC 5 ms
8,208 KB
testcase_39 AC 73 ms
14,412 KB
testcase_40 AC 73 ms
14,564 KB
testcase_41 AC 75 ms
14,372 KB
testcase_42 AC 74 ms
14,336 KB
testcase_43 AC 74 ms
14,404 KB
testcase_44 AC 72 ms
14,340 KB
testcase_45 AC 73 ms
14,376 KB
testcase_46 AC 74 ms
14,384 KB
testcase_47 AC 76 ms
14,344 KB
testcase_48 AC 73 ms
14,516 KB
testcase_49 AC 58 ms
14,336 KB
testcase_50 AC 114 ms
14,364 KB
testcase_51 AC 112 ms
14,280 KB
testcase_52 AC 111 ms
14,292 KB
testcase_53 AC 113 ms
14,288 KB
testcase_54 AC 112 ms
14,304 KB
testcase_55 AC 59 ms
14,456 KB
testcase_56 WA -
testcase_57 WA -
testcase_58 WA -
testcase_59 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC target("avx2")
#pragma GCC optimize("unroll-loops")

#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstring>
#include <deque>
#include <forward_list>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define ALL(x) (x).begin(), (x).end()
#define PC(x) __builtin_popcount(x)
#define PCL(x) __builtin_popcountll(x)

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
struct edge {
    int to, cost, id;
};
const double PI = 3.14159265358979323846;
const double PI2 = PI * 2.0;
const double EPS = 1E-09;
const ll MOD = 1E+09 + 7; // =998244353;
const ll INFL = 1E18;
const int INFI = 1E09;
const int MAX_N = 2E+05;

ll dx[4] = { 0, -1, 0, 1 }, dy[4] = { 1, 0, -1, 0 };

int N;

vector<int> G[MAX_N + 1];

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    cin >> N;

    for (int i = 1; i <= N - 1; ++i) {
        int x, y;
        cin >> x >> y;
        G[x].push_back(y);
        G[y].push_back(x);
    }

    // for (int i = 0; i < N; i++) {
    //     for (int j = 0; j < N; j++) {
    //         cout << "i = " << i << ", j = " << j << ", dp = " << dp[i][j] << "\n";
    //     }
    // }

    cout << N << "\n";

    return 0;
}
0