제출 #527937

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
5279372022-02-18 19:45:16perchuts도서관 (JOI18_library)C++17
100 / 100
300 ms284 KiB
#include <bits/stdc++.h>
#include "library.h"
using namespace std;
// int Query(const vector<int>& v);
// void Answer(const vector<int>& res);
bool pos[1011];
void Solve(int N)
{
vector<int> M(N);
for(int i = 0; i < N; i++) {
M[i] = 1;
}
// 4LogN => acho o primeiro e o ultimo. agora, achar os do meio...
//só fazer uma busca simples
//nao ;-;
int A = Query(M);
vector<int> res(N);
int last=-1,cur,l,r;
for(int k=1;k<=N;++k){
l = 1, r = N-k+1, cur = r;
while(l<=r){
int md = l + (r-l+1)/2,cnt=0;
// printf("%d %d\n",l,md);
for(int i=1;i<=N;i++){
if(pos[i]){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

library.cpp: In function 'void Solve(int)':
library.cpp:20:6: warning: unused variable 'A' [-Wunused-variable]
   20 |  int A = Query(M);
      |      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...