# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
724054 | 2023-04-14T16:17:51 Z | vjudge1 | Catfish Farm (IOI22_fish) | C++17 | 0 ms | 0 KB |
#include<bits/stdc++.h> #define ll long long #define ld long double #define db double #define ull unsigned long long #define pb push_back #define inf 1000000000000000000 #define linf 1000000000 #define mpr make_pair #define in insert #define pii pair<int,int> #define pll pair<ll,ll> #define f first #define s second //author :: E.Mustafayev using namespace std; const int mod=1e9+7; ll max_weights(int N, int M, int X[], int Y[], int W[]){ ll ans=0; for(int i=0;i<M;i++){ ans+=W[i]; } return ans; } void solve(){ int n,m; cin>>n>>m; int x[m],y[m],w[m]; for(int i=0;i<m;i++){ cin>>x[i]>>y[i]>>w[i]; } cout<<max_weights(n,m,x,y,w); } int main(){ ios_base::sync_with_stdio(false); solve(); }