제출 #284844

#제출 시각아이디문제언어결과실행 시간메모리
284844mohammad커다란 상품 (IOI17_prize)C++14
20 / 100
114 ms368 KiB
#include "prize.h" #include<bits/stdc++.h> using namespace std; #define endl "\n" // #define int long long typedef long long ll ; const ll ooo = 1e14 ; const ll oo = 2e9 ; const double PI = acos(-1) ; const ll M = 1e9 + 7 ; const int N = 10000010 ; int find_best(int n) { int lo = 0 , hi = n - 1 , ans =0 ; while(lo <= hi){ int md = (lo + hi) / 2; vector<int> res = ask(md); if(res[0] + res[1] == 0) return md; if(res[1]) lo= md + 1; else hi = md - 1; } }

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

prize.cpp: In function 'int find_best(int)':
prize.cpp:16:28: warning: unused variable 'ans' [-Wunused-variable]
   16 |  int lo = 0 , hi = n - 1 , ans =0 ;
      |                            ^~~
prize.cpp:25:1: warning: control reaches end of non-void function [-Wreturn-type]
   25 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...