#include <bits/stdc++.h>
#include <sstream>
#include <fstream>
///////////////////////////////////
///////////////////////////////////
///////////////////////////////////
///////////////////////////////////
///////////////////////////////////
//WAS CREAtED BY BAISYN MUKHAMMED//
///////////////////////////////////
///////////////////////////////////
///////////////////////////////////
///////////////////////////////////
///////////////////////////////////
#define et "\n"
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define ioi ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
#define M 1000000007
using namespace std;
ll n,m,a[211111];
void solve() {
cin >> n;
for (int i = 1;i < n;i++) {
ll x,y,z;
cin >> x >> y >> z;
m += z;
}
ll q;
cin >> q;
ll a,b,c,g,e;
cin >> a >> b >> c >> g >> e;
cout << m << et;
}
int main () {
ioi;
// freopen("input.txt","r",stdin);
// freopen("output.txt","w",stdout);
ll t = 1;
// cin >> t;
while (t--) {
solve();
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
8 ms |
468 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
8 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
8 ms |
468 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |