Submission #1197062

#TimeUsernameProblemLanguageResultExecution timeMemory
1197062nvc2k8Combo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "combo.h" #define TASK "task" #define INT_LIM (int) 2147483647 #define LL_LIM (long long) 9223372036854775807 #define endl '\n' #define mp make_pair #define pb push_back #define fi first #define se second #define BIT(i,x) (((i)>>(x))&1) #define FOR(i,a,b) for(int i = (a); i<=(b); i++) #define FORD(i,a,b) for(int i = (a); i>=(b); i--) #define ll long long #define pii pair<int,int> using namespace std; ///------------------------------------------/// string guess_sequence(int N) { string ret = ""; vector<char> digit = {'A', 'B', 'X', 'Y'}; if (N==3) { FOR(i, 1, 3) { for (auto d:digit) { ret+= d; if (press(ret)==i) break; ret.pop_back(); } } return ret; } return ret; } signed main() { ///--------------------------/// ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); if (fopen(TASK".INP","r")!=NULL) { freopen(TASK".INP","r",stdin); freopen(TASK".OUT","w",stdout); } ///--------------------------/// int NTEST = 1; //cin >> NTEST; return 0; } ///------------------------------------------///

Compilation message (stderr)

combo.cpp: In function 'int main()':
combo.cpp:47:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   47 |         freopen(TASK".INP","r",stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
combo.cpp:48:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   48 |         freopen(TASK".OUT","w",stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccwy9gHy.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cczPXbN2.o:combo.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status