Submission #410037

#TimeUsernameProblemLanguageResultExecution timeMemory
410037levsog2004Fun Tour (APIO20_fun)C++14
Compilation error
0 ms0 KiB
#include <iostream> #include <iomanip> #include <fstream> #include <algorithm> #include <cstring> #include <string> #include <vector> #include <queue> #include <deque> #include <stack> #include <cmath> #include <list> #include <set> #include <map> #define all(x) x.begin(),x.end() #define se second #define fr first #define m_p make_pair using namespace std; typedef int ll; const ll N = 1000004; const ll inf = 1000 * 1000 * 100 + 7; //const ll oo = 1000 * 1000 * 1000000; ll n, m, k, u, x,s, r, y,q, z, pat, mx,ans,dp[3000][500]; int main() { cin >> n >> k; for (int i = 0; i < 3000; i++) for (int j = 0; j < 70; j++) dp[i][j] = inf; for (int i = 1; i < 2001; i++) dp[i][1] = i-1; for (int i = 1; i < 61; i++) dp[1][i] = 0; for (int i = 2; i <= n; i++) { for (int j = 2; j < k + 1; j++) { for (int u = 1; u <= i; u++) dp[i][j] = min(dp[i][j], max(dp[u][j - 1], dp[i - u][j])+1); } } cout << dp[n][k] << endl; return 0; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccOV14je.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccuMBOmc.o:fun.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccOV14je.o: in function `main':
grader.cpp:(.text.startup+0x62a): undefined reference to `createFunTour(int, int)'
collect2: error: ld returned 1 exit status