Submission #724054

# Submission time Handle Problem Language Result Execution time Memory
724054 2023-04-14T16:17:51 Z vjudge1 Catfish Farm (IOI22_fish) C++17
Compilation error
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();

}

Compilation message

/usr/bin/ld: /tmp/ccQ3Tko8.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc7yyRT8.o:fish.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccQ3Tko8.o: in function `main':
grader.cpp:(.text.startup+0x25e): undefined reference to `max_weights(int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status