結果

問題 No.2726 Rooted Tree Nim
コンテスト
ユーザー nok0
提出日時 2023-12-25 21:27:24
言語 C++17(gcc12)
(gcc 12.4.0 + boost 1.90.0)
コンパイル:
g++-12 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 686 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 7,017 ms
コンパイル使用メモリ 336,532 KB
実行使用メモリ 38,004 KB
最終ジャッジ日時 2026-07-03 08:13:32
合計ジャッジ時間 9,084 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>

#include "atcoder/dsu"
#include "testlib.h"

using namespace std;

int main(int argc, char *argv[]) {
	registerValidation(argc, argv);
	int t = inf.readInt(1, 100000);
	inf.readEoln();
	int nsum = 0;
	for(int j = 0; j < t; j++) {
		int n = inf.readInt(2, 200000);
		inf.readSpace();
		atcoder::dsu uf(n);
		nsum += n;
		int k = inf.readInt(1, 1000000000);
		inf.readEoln();
		for(int i = 0; i < n - 1; i++) {
			int u = inf.readInt(1, n);
			inf.readSpace();
			int v = inf.readInt(1, n);
			inf.readEoln();
			uf.merge(--u, --v);
		}
		vector<int> a = inf.readInts(n, 1, 1000000000);
		inf.readEoln();
	}
	ensure(nsum <= 200000);
	inf.readEof();
	return 0;
}
0