Submission #792106

#TimeUsernameProblemLanguageResultExecution timeMemory
7921066arenCatfish Farm (IOI22_fish)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include <cp/debugger.hpp> #else #define debug(...) 42 #endif #define sz(v) ((int)(v).size()) #define all(v) (v).begin(), (v).end() typedef long long int64; typedef pair<int, int> ii; int64 max_weights(int n, int m, vector<int> x, vector<int> y, vector<int> w) { int64 res0 = 0, res1 = 0; for (int i = 0; i < m; i++) { if (x[i] == 0) res0 += w[i]; else res1 += w[i]; } return max(res0, res1); } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n, m; cin >> n >> m; vector<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) << '\n'; return 0; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cc9MoyEL.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccyjlN1L.o:fish.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status