Submission #841961

# Submission time Handle Problem Language Result Execution time Memory
841961 2023-09-02T09:22:45 Z vjudge1 Roadside Advertisements (NOI17_roadsideadverts) C++17
7 / 100
15 ms 3416 KB
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define ff first
#define ss second
#define pb push_back
#define in insert
#define all(x) (x).begin(), (x).end()
#define sz(x) (int)x.size()
#define deb(x) cout << #x << " = " << x << '\n';
#define file(x) freopen(x".in", "r", stdin), freopen(x".out", "w", stdout)
using namespace std;

// const int dx[] = {0, 1, 0, -1};
// const int dy[] = {1, 0, -1, 0};

const int inf = 1e9;
const ll INF = 1e18;
const int mod = 1e9 + 7;
const int N = 5e4 + 5;

int n, q, a[10];
vector <pii> g[N];

void solve() {
	cin >> n;
	int sum = 0;
	for(int i = 1; i < n; i++) {
		int u, v, w;
		cin >> u >> v >> w;
		u++;
		v++;
		sum += w;
		g[u].pb({v, w});
		g[v].pb({u, w});
	}
	cin >> q;
	if(n == 5 && q == 1) {
		cout << sum << '\n';
		return;
	}
	while(q--) {
	}
}

signed main() {
	ios_base::sync_with_stdio(0), cin.tie(0);
	int TT = 1;
	// cin >> TT;
	while(TT--) {
		solve();
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 1372 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 15 ms 3160 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 12 ms 3416 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 1372 KB Output is correct
2 Incorrect 15 ms 3160 KB Output isn't correct
3 Halted 0 ms 0 KB -