摘要:
题目大意:组合数取模,n和m并不算大,p比较大且是合数。思路:暴力分解+快速幂注:暴力也是有区别的,分解质因数时可以用以下work函数,写的非常巧妙,摘录自互联网。 1 #include 2 #include 3 using namespace std; 4 5 typedef long lo... 阅读全文
摘要:
一开始想多了,以为应该做个数位dp的,后来想了想也不过100W的数据,直接暴力好像也不慢,于是暴力就过了,还挺快。 1 #include 2 using namespace std; 3 4 bool judge( int x, int d ) 5 { 6 while ( x ) 7 ... 阅读全文