Submission #1321218

#TimeUsernameProblemLanguageResultExecution timeMemory
1321218phungmanager0Split the Attractions (IOI19_split)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a), _b = (b); i <= _b; i++) #define FORD(i, b, a) for (int i = (b), _a = (a); i >= _a; i--) #define REP(i, n) for (int i = 0, _n = (n); i < _n; i++) #define FORE(i, v) for (__typeof((v).begin()) i = (v).begin(); i != (v).end(); i++) #define ALL(v) (v).begin(), (v).end() #define IS_INF(x) (std::isinf(x)) #define IS_NAN(x) (std::isnan(x)) #define fi first #define se second #define int long long #define MASK(i) (1LL << (i)) #define BIT(x, i) (((x) >> (i)) & 1) #define div ___div #define prev ___prev #define next ___next #define left ___leftc #define right ___right #define TIME (1.0 * clock() / CLOCKS_PER_SEC) #define __Im_sogood__ main() #define __builtin_popcount __builtin_popcountll using namespace std; const int MAXN = 2e5 + 5; const int INF = 1e18; int n, a, b, c; vector<int> p, q; // geometry void read_fake_input() { cin >> n >> a >> b >> c; p.resize(n); q.resize(n); REP(i, n) cin >> p[i]; REP(i, n) cin >> q[i]; } struct DisjointSet { vector<int> par, Sz; void init(int n) { par.resize(n + 5); Sz.resize(n + 5); REP(i, n) par[i] = i, Sz[i] = 1;} int get(int u) { return (par[u] == u ? u : par[u] = get(par[u])); } bool merge(int u, int v) { u = get(u); v = get(v); if(u == v) return false; if(Sz[u] < Sz[v]) swap(u, v); par[v] = u; Sz[u] += Sz[v]; return true; } }; vector<int> find_split(int n, int a, int b, int c, vector<int> p, vector<int> q) { } void solve() { read_fake_input(); vector<int> res = find_split(n, a, b, c, p, q); REP(i, n) cout << res[i] << " "; } __Im_sogood__{ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); solve(); cerr << "Time elapsed: " << TIME << " s.\n"; return 0; }

Compilation message (stderr)

split.cpp: In function 'std::vector<long long int> find_split(long long int, long long int, long long int, long long int, std::vector<long long int>, std::vector<long long int>)':
split.cpp:46:1: warning: no return statement in function returning non-void [-Wreturn-type]
   46 | }
      | ^
split.cpp: At global scope:
split.cpp:20:23: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   20 | #define __Im_sogood__ main()
      |                       ^~~~
split.cpp:51:1: note: in expansion of macro '__Im_sogood__'
   51 | __Im_sogood__{
      | ^~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccBSudZ1.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccR29eQQ.o:split.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccBSudZ1.o: in function `main':
grader.cpp:(.text.startup+0x270): undefined reference to `find_split(int, int, int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status