제출 #399998

#제출 시각아이디문제언어결과실행 시간메모리
399998faresbasbs비스킷 담기 (IOI20_biscuits)C++14
0 / 100
2 ms332 KiB
#include <bits/stdc++.h> #include "biscuits.h" using namespace std; map<pair<int,long long>,long long> dp; vector<long long> a; int x; long long ans(int curr , long long val){ if(curr == a.size()){ return 1; } val += a[curr]; if(dp.find({curr,val}) != dp.end()){ return dp[{curr,val}]; } long long ret = ans(curr+1,val/2); if(val >= x){ ret += ans(curr+1,(val-x)/2); } return dp[{curr,val}] = ret; } long long count_tastiness(long long X , vector<long long> A){ a = A , x = X; return ans(0,0); }

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

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