摘要:
笔记仅为个人总结模板和理解,最近才开始总结,逐渐完善中。。。 快速幂: while (n) //n为多少次方{ if (n & 1) k = k * x % mod; n >>= 1; x = x * x % mod; } return k ; } 差分: for(int i=1;i<=n;i++) 阅读全文
摘要:
1107: ZN的随机数 #include<bits/stdc++.h> using namespace std; typedef long long ll; int ans; int main() { ll n,m; while(cin>>n)//在while中赋值 { ans=0; bool a 阅读全文
摘要:
统计一下每种数位的数量,存在数组里,然后再来找就可以了,萌新代码比较难看,欢迎支持提建议(csdn博客https://blog.csdn.net/weixin_75172140) #include <bits/stdc++.h> using namespace std; int main() { i 阅读全文
摘要:
这方法不能叫dps吧,只能说是递归?偷懒懒得想名字了(csdn博客https://blog.csdn.net/weixin_75172140) #include <bits/stdc++.h> using namespace std; int ans = 0; //种类// void dps(int 阅读全文
摘要:
2015年简单题多点,找回了一点自信,2017还18简直噩梦 #include <bits/stdc++.h> using namespace std; int main() { int y, m, d, n; cin >> y >> m >> d >> n;//初始年,月,日// while (n 阅读全文