답안 #764859

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
764859 2023-06-24T05:56:00 Z vjudge1 Roadside Advertisements (NOI17_roadsideadverts) C++17
7 / 100
14 ms 1520 KB
// #pragma GCC optimize("O3,unroll-loops")
// #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#include <bits/stdc++.h>
#define ent '\n'
#define all(x) x.begin(), x.end()
#define s second
#define f first
#define pb push_back
typedef long long ll;
using namespace std;
const int maxn = 2e6 + 250;
const int mod = 1e9 + 7;
const int K = 400;
const double Pi = acos(-1.0);
const long double eps = 1e-9;
#define int long long
int a[maxn], u[maxn], v[maxn], w[maxn];

void solve() {
    int n, k, sum = 0;
    cin >> n;
    for(int i = 1;i < n; i++) {
        cin >> u[i] >> v[i] >> w[i];
        sum  += w[i];
    }
    cin >> k;
    for(int i = 1;i <= k; i++) {
        int a, b, c, d, e;
        cin >> a >> b >> c >> d >> e;
    }
    cout << sum;
}
signed main () {
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    // freopen("position.in", "r" , stdin);
    // freopen("position.out", "w", stdout);
    int t = 1;
    // cin >> t;
    for(int i = 1;i <= t; i++) {
        // cout << "Case #" << i << ": ";
        solve();    
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 14 ms 1520 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 8 ms 1492 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 14 ms 1520 KB Output isn't correct
3 Halted 0 ms 0 KB -