제출 #863480

#제출 시각아이디문제언어결과실행 시간메모리
863480HossamHero7A Difficult(y) Choice (BOI21_books)C++14
5 / 100
102 ms1236 KiB
#include <bits/stdc++.h> #include "books.h" //#include "grader.cpp" using namespace std; typedef long long ll; void solve(int n, int k, long long a, int s) { vector<ll> v(n); for(int i=0;i<n;i++) v[i] = skim(i+1); for(int i=0;i<n;i++){ for(int j=i+1;j<n;j++){ int idx = lower_bound(v.begin()+j+1,v.end(),a-v[i]-v[j]) - v.begin(); if(idx == v.size()) continue; if(a <= v[i] + v[j] + v[idx] && v[i] + v[j] + v[idx] <= 2*a) return answer({i+1,j+1,idx+1}); } } impossible(); }

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

books.cpp: In function 'void solve(int, int, long long int, int)':
books.cpp:13:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |             if(idx == v.size()) continue;
      |                ~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...