#include <bits/stdc++.h>
#define ll long long
#define f first
#define s second
#define pb push_back
using namespace std;
const ll N = 1e6 + 9;
const ll M = 5e3 + 9;
const ll MOD = 1e9 + 7;
void be (){
ios_base::sync_with_stdio (0);
cin.tie (0);
}
void solve (){
int n;
cin >> n;
ll q = 0;
for (int i = 1; i < n; ++i){
int l, r, u;
cin >> l >> r >> u;
q += u;
}
int m;
cin >> m;
while (m--){
int z[6];
for (int i = 1; i <= 5; ++i){
cin >> z[i];
}
cout << q;
}
}
signed main (){
be ();
ll t = 1;
// cin >> t;
for (ll i = 1; i <= t; ++i){
// cout << "Case " << i << ':' << '\n';
solve ();
// cout << '\n';
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
12 ms |
340 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
8 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
12 ms |
340 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |