제출 #64548

#제출 시각아이디문제언어결과실행 시간메모리
64548zadrgaCity (JOI17_city)C++14
컴파일 에러
0 ms0 KiB
#include "Device.h" #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define fi first #define se second #define INF (1LL << 55) #define MOD (1000 * 1000 * 1000 + 7) #define maxm 1000111 #define maxn 250111 #define maxk 252 typedef long long ll; typedef long double ld; typedef pair<int, int> pii; int a1[maxk]; void InitDevice(){ a1[1] = 1; for(int i = 2; i < maxk; i++){ a1[i] = (double) a1[i - 1] * 1.05; a1[i] = max(a1[i], a1[i - 1] + 1); } } void decode(ll x, int &l, int &d){ l = x % maxm; d = l + a1[x / maxm] - 1; } int Answer(long long S, long long T){ int la, ra; decode(S, la, ra); int lb, rb; decode(T, lb, rb); if(lb <= la && ra <= rb) return 0; if(la <= lb && rb <= ra) return 1; return 2; }
#include "Device.h" #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define fi first #define se second #define INF (1LL << 55) #define MOD (1000 * 1000 * 1000 + 7) #define maxm 1000111 #define maxn 250111 #define maxk 252 typedef long long ll; typedef long double ld; typedef pair<int, int> pii; int a1[maxk]; void InitDevice(){ a1[1] = 1; for(int i = 2; i < maxk; i++){ a1[i] = (double) a1[i - 1] * 1.05; a1[i] = max(a1[i], a1[i - 1] + 1); } } void decode(ll x, int &l, int &d){ l = x % maxm; d = l + a1[x / maxm] - 1; } int Answer(long long S, long long T){ int la, ra; decode(S, la, ra); int lb, rb; decode(T, lb, rb); if(lb <= la && ra <= rb) return 0; if(la <= lb && rb <= ra) return 1; return 2; }

컴파일 시 표준 에러 (stderr) 메시지

/tmp/ccWr5FgJ.o: In function `main':
grader_encoder.cpp:(.text.startup+0xb7): undefined reference to `Encode(int, int*, int*)'
collect2: error: ld returned 1 exit status