摘要:
1 #include<bits/stdc++.h> 2 using namespace std; 3 int a,b; 4 int gd; 5 vector<int>v; 6 int main() 7 { 8 9 cin>>a>>b; 10 int n; 11 cin>>n; 12 gd=gcd(a 阅读全文
posted @ 2021-12-18 22:26
matt-11
阅读(28)
评论(0)
推荐(0)
摘要:
1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=1e6+5; 4 int dp[N];//dp[i]表示以i结尾的最长合法串长度; dp[i]转移,考虑当前i为')' 栈里只压入'('则dp[i]=dp[j-1]+i-j+ 阅读全文
posted @ 2021-12-18 22:20
matt-11
阅读(62)
评论(0)
推荐(0)
摘要:
1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=105; 4 int n; 5 int in[N]; 6 vector<int>G[N]; 7 int main() 8 { 9 scanf("%d",&n); 10 que 阅读全文
posted @ 2021-12-18 16:57
matt-11
阅读(65)
评论(0)
推荐(1)
摘要:
P1546 [USACO3.1]最短网络 Agri-Net 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=105; 4 int n,tot; 5 int fa[N]; 6 int read() 7 { 8 int x=0 阅读全文
posted @ 2021-12-18 16:08
matt-11
阅读(50)
评论(0)
推荐(0)
摘要:
题目后续补吧,主要解决问题; 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=1e5+5; 4 int fa[N]; 5 int find_fa(int x){ 6 return fa[x]=(x==fa[x])?x:fi 阅读全文
posted @ 2021-12-18 11:54
matt-11
阅读(28)
评论(0)
推荐(0)
摘要:
1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=1e2+5; 4 int G[N][N]; 5 int main() 6 { 7 int n,m; 8 scanf("%d%d",&n,&m); 9 for(int i=1; 阅读全文
posted @ 2021-12-18 11:18
matt-11
阅读(31)
评论(0)
推荐(0)

浙公网安备 33010602011771号