上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 37 下一页
摘要: A /* Huyyt */ #include <bits/stdc++.h> using namespace std; typedef long long ll; string a[1005]; int num[30]; map<ll, int> mp; int main() { int n; ci 阅读全文
posted @ 2018-05-02 12:26 Aragaki 阅读(182) 评论(0) 推荐(0) 编辑
摘要: A #include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; int main() { int n; cin >> n; string a; cin >> a; int one = 0; int zer 阅读全文
posted @ 2018-05-01 18:21 Aragaki 阅读(169) 评论(0) 推荐(0) 编辑
摘要: A #include<bits/stdc++.h> using namespace std; int dir[4][2] = {{0, -1}, {0, 1}, { -1, 0}, {1, 0}}; typedef long long ll; int n, s; int h[105]; int m[ 阅读全文
posted @ 2018-04-30 15:47 Aragaki 阅读(211) 评论(0) 推荐(0) 编辑
摘要: https://www.nowcoder.com/acm/contest/106#question A 分类讨论 #include<bits/stdc++.h> using namespace std ; #define LL long long int a[100010] ; int d[1000 阅读全文
posted @ 2018-04-29 21:05 Aragaki 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include<cstdio> 3 #include<cstdlib> 4 #include<cstring> 5 #include<cmath> 6 #include<stdio.h> 7 #include<string.h> 8 #include< 阅读全文
posted @ 2018-04-29 13:02 Aragaki 阅读(512) 评论(0) 推荐(1) 编辑
摘要: 例:给定一个图,图上每条边是红色或蓝色 求恰好有K条红边的生成树的个数,N<=50. Matrix-Tree定理 对于限制条件可以利用多项式,把红边边权设为X,蓝边边权设为1. 最后求行列式得到的多项式中,X^k的系数就是答案. 同样这也是利用了边权乘积的推广. 至于多项式情况下不方便高斯消元的问题 阅读全文
posted @ 2018-04-28 23:38 Aragaki 阅读(221) 评论(0) 推荐(0) 编辑
摘要: A /*#include<cstring>#include<algorithm>#include<queue>#include<vector>#include<cstdio>#include<cmath>#include<iostream>*/ #include<bits/stdc++.h> usi 阅读全文
posted @ 2018-04-26 23:22 Aragaki 阅读(367) 评论(0) 推荐(0) 编辑
摘要: A B C #include <bits/stdc++.h> #define PI acos(-1.0) #define mem(a,b) memset((a),b,sizeof(a)) #define TS printf("!!!\n") #define pb push_back #define 阅读全文
posted @ 2018-04-25 13:59 Aragaki 阅读(214) 评论(0) 推荐(0) 编辑
摘要: Kosoraju SCC总数及记录SCC所需要的最少边情况 #include<cstdio> const int N = 300010; int scc_cnt = 0; int Case, n, m, i, x, y, cnt, use[N], g[2][N], nxt[2][N], v[2][N 阅读全文
posted @ 2018-04-24 21:12 Aragaki 阅读(282) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/Ash-ly/p/5452580.html 阅读全文
posted @ 2018-04-23 13:39 Aragaki 阅读(189) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 37 下一页