제출 #1084392

#제출 시각아이디문제언어결과실행 시간메모리
1084392avighnaFirefighting (NOI20_firefighting)C++17
3 / 100
140 ms31944 KiB
#include <bits/stdc++.h> typedef long long ll; int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); ll n, k; std::cin >> n >> k; std::vector<std::vector<std::pair<ll, ll>>> adj(n + 1); ll min_w = 1e15; for (ll i = 0, u, v, w; i < n - 1; ++i) { std::cin >> u >> v >> w; adj[u].push_back({v, w}); adj[v].push_back({u, w}); min_w = std::min(min_w, w); } if (k < min_w) { std::cout << n << '\n'; for (ll i = 1; i <= n; ++i) { std::cout << i << ' '; } std::cout << '\n'; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...