摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 typedef pair<int,int> pii; 5 const int N=1e6; 6 int path[N]; 7 ll dis[N]; 8 阅读全文
posted @ 2021-12-11 21:43 matt-11 阅读(31) 评论(0) 推荐(0)
摘要: 洛谷 P6218 [USACO06NOV] Round Numbers S 1 #include<bits/stdc++.h> 2 using namespace std; 3 //dp[dep][cnt1][cnt0];//表示1-n中考虑到dep位,1的个数为cnt1个,0的个数为cnt0个,的 阅读全文
posted @ 2021-12-11 17:12 matt-11 阅读(43) 评论(0) 推荐(0)
摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 struct node{ 4 node *left,*right; 5 int val; 6 }; 7 void insert(node * &bt,int n) 8 { 9 10 if(bt) 1 阅读全文
posted @ 2021-12-11 15:48 matt-11 阅读(35) 评论(0) 推荐(0)
摘要: 洛谷P4127 [AHOI2009]同类分布 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 ll dp[20][163][163];//表示余数和为md,考虑到dep位第dep位还未选,数位和为s 阅读全文
posted @ 2021-12-11 14:03 matt-11 阅读(36) 评论(0) 推荐(0)