제출 #608472

#제출 시각아이디문제언어결과실행 시간메모리
608472CyberCowPacking Biscuits (IOI20_biscuits)C++17
0 / 100
1103 ms294676 KiB
#include "biscuits.h" #include <vector> #include <map> using namespace std; using ll = long long; map<ll, ll> dp[150]; ll count_tastiness(ll x, vector<ll> a) { for (int i = 0; i < 70; i++) { a.push_back(0); } ll ans = 1; dp[0][0] = 1; for (int i = 0; i < a.size(); i++) { for (auto it : dp[i]) { if ((it.first + a[i] - x) >= 0) { dp[i + 1][(it.first + a[i] - x) / 2] += it.second; ans += it.second; } dp[i + 1][(it.first + a[i]) / 2] += it.second; } } return ans; }

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

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