제출 #560503

#제출 시각아이디문제언어결과실행 시간메모리
560503AlperenT비스킷 담기 (IOI20_biscuits)C++17
0 / 100
2 ms340 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; long long count_tastiness(long long x, vector<long long> a){ vector<long long> prv, cur; while(!a.empty() && a.back() == 0) a.pop_back(); cur.push_back(0); for(int k = 0; k < a.size(); k++){ prv = cur; cur.clear(); for(auto i : prv){ cur.push_back(i / 2 + a[k]); if(i / 2 + a[k] >= x) cur.push_back(i / 2 + a[k] - x); } } return cur.size(); }

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

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