제출 #1072610

#제출 시각아이디문제언어결과실행 시간메모리
1072610HD1비스킷 담기 (IOI20_biscuits)C++14
0 / 100
1 ms348 KiB
#include "biscuits.h" #include <iostream> #include <map> using namespace std; long long a[200],x; map<long long,long long> dp[200]; // dp[0][60] = 1 long long DP(int i,int n){ if(n == 0 && i >= 60) return 1; if(dp[i][n] != 0) return dp[i][n]; long long ans = DP(i+1,(a[i]+n)/2); if(a[i] + n >= x) ans += DP(i+1,(a[i]+n-x)/2); return dp[i][n] = ans; } long long count_tastiness(long long xx, std::vector<long long> aa) { x = xx; for(int i = 0; i < aa.size(); i++) a[i] = aa[i]; return DP(0,0); }

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

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