Submission #1100138

#TimeUsernameProblemLanguageResultExecution timeMemory
1100138CpDarkRoadside Advertisements (NOI17_roadsideadverts)C++17
7 / 100
12 ms2652 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...