제출 #125905

#제출 시각아이디문제언어결과실행 시간메모리
125905chubyxdxd커다란 상품 (IOI17_prize)C++11
0 / 100
2 ms376 KiB
#include "prize.h" #include <bits/stdc++.h> using namespace std; int find_best(int n) { int a,b,c,d,f; int low=0;int hi=n-1,mid; while(low-hi>1){ mid=(low+hi)/2; vector<int> v=ask(mid); if(v[0]==0 and v[1]==0){ return mid; break; } if(v[0]<v[1]){ low=mid; } else{ hi=mid; } } return ((low+hi)/2); }

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

prize.cpp: In function 'int find_best(int)':
prize.cpp:6:6: warning: unused variable 'a' [-Wunused-variable]
  int a,b,c,d,f;
      ^
prize.cpp:6:8: warning: unused variable 'b' [-Wunused-variable]
  int a,b,c,d,f;
        ^
prize.cpp:6:10: warning: unused variable 'c' [-Wunused-variable]
  int a,b,c,d,f;
          ^
prize.cpp:6:12: warning: unused variable 'd' [-Wunused-variable]
  int a,b,c,d,f;
            ^
prize.cpp:6:14: warning: unused variable 'f' [-Wunused-variable]
  int a,b,c,d,f;
              ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...