Submission #1048542

#TimeUsernameProblemLanguageResultExecution timeMemory
1048542antonScissors and Tape (CEOI19_scissors)C++17
0 / 100
13 ms26560 KiB
#include<bits/stdc++.h> using namespace std; #define int long long int N, M, K; struct Fruit{ int pos, t, w; Fruit(int _pos, int _t, int _w){ pos = _pos; t= _t; w =_w; } }; vector<Fruit> fr; vector<int> anc; signed main(){ cin.tie(NULL); ios_base::sync_with_stdio(false); cin>>N>>M>>K; anc.resize(N); for(int i= 1; i<N; i++){ cin>>anc[i]; anc[i]--; } int RES =0; for(int i = 0; i<M; i++){ int v, d, w; cin>>v>>d>>w; fr.push_back(Fruit(v-1, d, w)); RES += w; } cout<<RES<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...