Submission #1188526

#TimeUsernameProblemLanguageResultExecution timeMemory
1188526qwushaFlight to the Ford (BOI22_communication)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define fi first #define se second typedef long long ll; typedef long double ld; mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count()); #define int long long #define ld long double signed main() { string s; cin >> s; int n = s.size(); ld res = 0; for (int i = 0; i < n / 2; i++) { res += i; } for (int i = n - 1; i >= n / 2; i--) { res += (n - 1 - i); } res /= 2; cout << setprecision(15) << res << '\n'; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cctTnnyW.o: in function `main':
interface.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccLYZwut.o:communication.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cctTnnyW.o: in function `_do_encode(int, int)':
interface.cpp:(.text+0x1d9): undefined reference to `encode(int, int)'
/usr/bin/ld: /tmp/cctTnnyW.o: in function `_do_decode(int)':
interface.cpp:(.text+0x219): undefined reference to `decode(int)'
/usr/bin/ld: /tmp/cctTnnyW.o: in function `main':
interface.cpp:(.text.startup+0xc2): undefined reference to `decode(int)'
/usr/bin/ld: interface.cpp:(.text.startup+0x16e): undefined reference to `encode(int, int)'
collect2: error: ld returned 1 exit status