제출 #1033410

#제출 시각아이디문제언어결과실행 시간메모리
1033410Maite_Morale비스킷 담기 (IOI20_biscuits)C++14
0 / 100
4 ms1116 KiB
#include <bits/stdc++.h> using namespace std; long long count_tastiness(long long x, std::vector<long long> a) { long long r=0, c=0; for(long long i=0;i<64;i++){ if(i<a.size())c+=(a[i]<<i); /// cerr<<r<<"=max(0LL,min("<<(c/x)<<"-"<<(1LL<<i)<<"+1,"<<(1LL<<i)<<"))\n"; r+=max(0LL,min((c/x)-(1LL<<i)+1,(1LL<<i))); } return r+1; }

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

biscuits.cpp: In function 'long long int count_tastiness(long long int, std::vector<long long int>)':
biscuits.cpp:7:7: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 |   if(i<a.size())c+=(a[i]<<i);
      |      ~^~~~~~~~~
#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...