摘要:
PS:水得不能再水..刚开始还以为是大数。。要用到快速幂...谁知道想太多...就普通int型.. 代码: #include "stdio.h" int main(){ int a,b; int T,i; while(~scanf("%d",&T)){ for(i=0;i<T;i++){ scanf 阅读全文
摘要:
Ps:wa了两次....一次是从加法那边暴力,然而算法错误..应该从乘法那边暴力破解...然而又没算负数。。加上负数..直接暴力AC. 代码: #include "stdio.h" int abs(int a); int main(){ int i,a,b,s,flag,flag1; while(~ 阅读全文
摘要:
PS:额...暴力打表...今天学到的新名词..记得把数组开到100W。。 代码: #include "stdio.h" int dp[1000100]; int cal(int a); int main(){ int i,t,n,m; dp[0]=0; for(i=1;i<=1000000;i++ 阅读全文