Submission #1100138

# Submission time Handle Problem Language Result Execution time Memory
1100138 2024-10-12T22:42:00 Z CpDark Roadside Advertisements (NOI17_roadsideadverts) C++17
7 / 100
12 ms 2652 KB
#include<bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;

int sum = 0;
void init(int N, vector<int> V, vector<int> U, vector<int> W) {
    for (int i = 0;i < N - 1;i++) sum += W[i];
}


int query(int a, int b, int c, int d, int e) {
    return sum;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int N, Q;
    cin >> N;

    vi V(N - 1), U(N - 1), W(N - 1);
    for (int i = 0;i < N - 1;i++)cin >> V[i] >> U[i] >> W[i];
    
    init(N, V, U, W);

    cin >> Q;
    for (int i = 0;i < Q;i++) {
        int a, b, c, d, e;
        cin >> a >> b >> c >> d >> e;
        cout << query(a, b, c, d, e);
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 12 ms 2652 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 8 ms 2140 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 12 ms 2652 KB Output isn't correct
3 Halted 0 ms 0 KB -