1116 - Ekka Dokka PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Ekka and his friend Dokka decided to buy a cake. They both love cakes and that's why they want to share the cake after buying it. As the name suggested tha…
1008 - Fibsieve`s Fantabulous Birthday PDF (English) Statistics Forum Time Limit: 0.5 second(s) Memory Limit: 32 MB Fibsieve had a fantabulous (yes, it's an actual word) birthday party this year. He had so many gifts that he was actually thinking o…
http://www.lightoj.com/volume_showproblem.php?problem=1027 You are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The probability for choosing a door is equal for all doors. If you choose the ith door, it ca…
题目链接 http://lightoj.com/volume_showproblem.php?problem=1031 Description You are playing a two player game. Initially there are n integer numbers in an array and player A and B get chance to take them alternatively. Each player can take one or more nu…
数位DP #include <cstdio> #include <cstring> using namespace std; ; ; long long n; int f[MAX_DIGIT]; ][MAX_DIGIT * ]; int k; int to_digits(long long a) { ; ) { f[ret++] = a % ; a /= ; } return ret; } long long dfs(int digit, bool less, int sum, i…
数位dp,许多数位dp需要统计某种模式(子串)出现的数量,这种题通常需要在递归参数中加入高位已经出现过的模式的数量. #include <cstdio> #include <cstring> using namespace std; #define D(x) ; long long n; int f[MAX_DIGIT]; ][MAX_DIGIT]; int cnt; int to_digits(long long a) { ; ) { f[ret++] = a % ; a /=…