摘要:
#include "bits/stdc++.h" using namespace std; #define LL long long #define INF 0x3f3f3f3f3f #define PI acos(-1) #define N 510 #define MOD 10 LL quickPow(LL a,LL b) { LL ans=1; while(b>0){ ... 阅读全文
摘要:
题意:n的阶乘后面0的个数,如果直接算出阶乘再数0的数量一定会超时的。 因为10=2*5,所以求出5贡献的次数就行。 阅读全文
摘要:
Input示例 Output示例 DP: 递推式: 阅读全文
摘要:
Input示例 Output示例 first try: O(n^2) Time limit exceeded,优化 second try: 第二层从后向前找,及时跳出 #include "bits/stdc++.h" using namespace std; #define LL long long 阅读全文