Submission #1159007

#TimeUsernameProblemLanguageResultExecution timeMemory
1159007arkanefury콤보 (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; #define pb push_back #define in insert #define lb lower_bound #define F first #define S second #define sz size() #define int long long #define all(v) v.begin(),v.end() #define FOR1(x, n) for(int j = x; j <= n; j ++) #define FOR(x, n, m, d) for(int x = n; x <= m; x += d) #define FORR(x, n, m, d) for(int x = n; x >= m; x -= d) #define nikita ios_base::sync_with_stdio(0), cin.tie(0); const int N = 4e5+5; int a[N], b[N], d[N], pref[N], L[N], R[N]; int n,m,k,sum=0,x,y, ans, r, cnt, l, mod = 1e9+7; string str = ""; string guess_sequence(int N){ string s = ""; ans = 0; while(ans != N){ s = str; FOR(i, 0, N-1-s.sz,1)s+='A'; sum = press(s); if(sum > ans){ FOR(i, 1, sum-ans, 1)str += 'A'; } ans = str.sz; s = str; FOR(i, 0, N-1-s.sz,1)s+='B'; sum = press(s); if(sum > ans){ FOR(i, 1, sum-ans, 1)str += 'B'; } ans = str.sz; s = str; FOR(i, 0, N-1-s.sz,1)s+='X'; sum = press(s); if(sum > ans){ FOR(i, 1, sum-ans, 1)str += 'X'; } ans = str.sz; s = str; FOR(i, 0, N-1-s.sz,1)s+='Y'; sum = press(s); if(sum > ans){ FOR(i, 1, sum-ans, 1)str += 'Y'; } ans = str.sz; s = str; } press(str); }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(long long int)':
combo.cpp:57:1: warning: no return statement in function returning non-void [-Wreturn-type]
   57 | }
      | ^
/usr/bin/ld: /tmp/ccw7tLiz.o: in function `main':
grader.cpp:(.text.startup+0x4c): undefined reference to `guess_sequence[abi:cxx11](int)'
collect2: error: ld returned 1 exit status