Submission #573209

#TimeUsernameProblemLanguageResultExecution timeMemory
573209AmirElarbiFlight to the Ford (BOI22_communication)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define vi vector<int> #define ve vector #define ll long long #define vf vector<float> #define vll vector<pair<ll,ll>> #define ii pair<int,int> #define vvi vector<vi> #define vii vector<ii> #define gii greater<ii> #define pb push_back #define mp make_pair #define fi first #define se second #define INF 1e9 #define eps 1e-7 #define eps1 1e-2 #define optimise ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define MAX_A 2e5+5 using namespace std; const int MOD = 1e4+7; const int nax = 1e5+5; typedef complex<int> Point; #define X real() #define Y imag() int s[nax]; vi adj[nax]; int main(){ optimise; #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int n,m; cin >>n >> m; for (int i = 0; i < n; ++i) { cin >> s[i]; } for (int i = 0; i < m; ++i) { int a,b; cin >> a >> b; adj[a].pb(b); adj[b].pb(a); } string res = "1"; for (int i = 1; i < n; ++i) { res += '0'; } cout << res << endl; }

Compilation message (stderr)

communication.cpp: In function 'int main()':
communication.cpp:31:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   31 |         freopen("input.txt", "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
communication.cpp:32:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   32 |         freopen("output.txt", "w", stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccdtfIvN.o: in function `main':
interface.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccB4nDVM.o:communication.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccdtfIvN.o: in function `_do_encode(int, int)':
interface.cpp:(.text+0x1d9): undefined reference to `encode(int, int)'
/usr/bin/ld: /tmp/ccdtfIvN.o: in function `_do_decode(int)':
interface.cpp:(.text+0x219): undefined reference to `decode(int)'
/usr/bin/ld: /tmp/ccdtfIvN.o: in function `main':
interface.cpp:(.text.startup+0xac): undefined reference to `decode(int)'
/usr/bin/ld: interface.cpp:(.text.startup+0x15c): undefined reference to `encode(int, int)'
collect2: error: ld returned 1 exit status