제출 #964880

#제출 시각아이디문제언어결과실행 시간메모리
96488075_yabukiFirefighting (NOI20_firefighting)C++14
3 / 100
196 ms32428 KiB
#define _D321EBUG
// #include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
// using namespace atcoder;
#define endl "\n"
#define fi first
#define se second
#define all(x) (x).begin(),(x).end() 
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ld, ld> pld;
typedef vector<int> vi;
typedef vector<pii> vii;
const long double pi = acos(-1.0);
const int INF = 1987654321;
const ll LLINF = 1e18;
const double eps = 1e-9;
template<class T>bool chmax(T& a, const T& b) { if (a <= b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b <= a) { a = b; return 1; } return 0; }
////////////////////////

// #ifndef ONLINE_JUDGE
// #include "template.cpp"
// #else
// #define debug(...)
// #define debugArr(...)
// #endif

////////////////////////

vector<pll> adj[300004];
int main(){
#ifdef _DEBUG   
    freopen ("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif      
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    
    ll N,K;cin>>N>>K;
    for(int i = 0; i < N-1;i++){
        ll u,v, c;cin>>u>>v>>c;
        adj[u].push_back({v, c});
        adj[v].push_back({u, c});
    }
    cout<<N<<endl;
    for(int i=1;i<=N;i++) cout<<i<<" ";
    
    return 0;
}
#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...