上一页 1 ··· 9 10 11 12 13 14 15 下一页
摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 map<ll,int>mp; 5 const int N=1e6; 6 ll ans[N]; 7 int main() 8 { 9 int m; 10 阅读全文
posted @ 2021-12-13 16:57 matt-11 阅读(46) 评论(0) 推荐(0)
摘要: 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)
摘要: 1 class Solution { 2 public: 3 typedef pair<int,int> pii; 4 struct cmp{ 5 bool operator ()(pii &a,pii &b) 6 { 7 return a.second>b.second; 8 } 9 }; 10 阅读全文
posted @ 2021-12-10 17:31 matt-11 阅读(35) 评论(0) 推荐(0)
摘要: ACWing 1133. 第二短路 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef pair<int,int> pii; 4 const int N=1e5+5; 5 int dis1[N],dis2[N],ans=INT_MAX 阅读全文
posted @ 2021-12-10 16:04 matt-11 阅读(64) 评论(0) 推荐(0)
摘要: leetcode 144. 二叉树的前序遍历 1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * Tr 阅读全文
posted @ 2021-12-10 13:56 matt-11 阅读(41) 评论(0) 推荐(0)
摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=105; 4 int dis[N][N]; 5 int val[N]; 6 int n; 7 int main() 8 { 9 memset(dis,0x3f,sizeof( 阅读全文
posted @ 2021-12-09 23:02 matt-11 阅读(35) 评论(0) 推荐(0)
摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=1e5+5; 4 /*int ph,pt;//head tail; 5 int myq[20];//ph==pt队列为空; 6 //当进行了pop操作Ph会前移,造成空间浪费 阅读全文
posted @ 2021-12-09 17:26 matt-11 阅读(110) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 下一页