摘要:
一开始想多了,以为应该做个数位dp的,后来想了想也不过100W的数据,直接暴力好像也不慢,于是暴力就过了,还挺快。 1 #include 2 using namespace std; 3 4 bool judge( int x, int d ) 5 { 6 while ( x ) 7 ... 阅读全文
摘要:
tarjan求强连通分量的裸题复习,可当做模板。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int N = 10001; 7 const int M = 100000; 8 int dfn[N], lo... 阅读全文
摘要:
插板法求得答案为:C(n+m,m)。直接运用lucas定理即可,只是需要预处理出阶乘值,否则会T。 1 #include 2 3 typedef long long ll; 4 const int N = 100000; 5 int f[N]; 6 7 void init( int p ) 8... 阅读全文