Submission #600634

#TimeUsernameProblemLanguageResultExecution timeMemory
600634nguyenTienArranging Shoes (IOI19_shoes)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define fi first #define se second ll res = 0; void sub1(vector <int>& v) { if(v[0] < 0) res = 0; else res = 1; } long long count_swaps(std::vector<int> s) { int n = s.size() / 2; if(n == 1) { sub1(s); return res; } return 1; } int main() { int n; assert(1 == scanf("%d", &n)); vector<int> S(2 * n); for (int i = 0; i < 2 * n; i++) assert(1 == scanf("%d", &S[i])); fclose(stdin); long long result = count_swaps(S); printf("%lld\n", result); fclose(stdout); return 0; }

Compilation message (stderr)

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