제출 #347673

#제출 시각아이디문제언어결과실행 시간메모리
347673amunduzbaev커다란 상품 (IOI17_prize)C++14
컴파일 에러
0 ms0 KiB
/** made by amunduzbaev **/ #include <bits/stdc++.h> #include "grader.cpp" using namespace std; #define ff first #define ss second #define pb push_back #define mp make_pair #define ub upper_bound #define lb lower_bound #define sz(x) (int)x.size() #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(),x.rend() #define fastios ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define Pi acos(-1); #define mod 1e9+7 #define inf 1e18 typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<ll> vll; typedef vector<int> vii; typedef vector<pll> vpll; typedef vector<pii> vpii; template<class T> bool umin(T& a, const T& b) {return a > b? a = b, true:false;} template<class T> bool umax(T& a, const T& b) {return a < b? a = b, true:false;} const int NN = 2e3+5; #include "prize.h" int find_best(int n) { int mx = 0; for(int i=0;i<n;i++){ vii tmp = ask(i); // finding answer mx = max(tmp[0] + tmp[1], mx); if(tmp[0] + tmp[1] == 0){ return i; } if(tmp[0] + tmp[1] != mx) continue; int l = i, r = n-1; while(l < r){ int m = (l + r)>>1; vii tt = ask(m); if(tt[0] + tt[1] == 0) return m; if(tt[1] == 0) n = m, r = min(r, n-1); if(tt[0] == 0 || tt == tmp) i = m+1, l = m; else r = m-1; } } return 0; }

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

/tmp/ccDJmrr1.o: In function `ask(int)':
grader.cpp:(.text+0x0): multiple definition of `ask(int)'
/tmp/ccbOn8Sk.o:prize.cpp:(.text+0x0): first defined here
/tmp/ccDJmrr1.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccbOn8Sk.o:prize.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status