摘要:
春有百花秋有月,夏有凉风冬有雪,若无闲事挂心头,便是人间好时节。 --《无门关》 解析:如果能没有忧思悲恐缠绕心田,那么每年每季每天都是人间最好的时节。 Tarjan讲解,时间戳和low[] P2341(受欢迎的奶牛) //统计出度为0的奶牛联通块 //如果出度为0的奶牛连通块不止一个,则没有一只奶 阅读全文
摘要:
入门:绿豆蛙的归宿UVA10288 优惠券 Couponsbzoj1419 red is good P1654 OSU!P4550 收集邮票P1850 换教室P3802 小魔女帕琪 P2634 [国家集训队]聪聪可可 P3750 [六省联考2017]分手是祝愿 P3412 仓鼠找sugar II P 阅读全文
摘要:
t1切圆 cut #include<cstdio> using namespace std; long long n; int main(){ freopen("cut.in","r",stdin); freopen("cut.out","w",stdout); scanf("%lld",&n); 阅读全文
摘要:
t1扫雷 二维数组,方向数组 #include<cstdio> using namespace std; char c[105][105];int a[105][105],n,m; int dx[]={0,1,1,1,0,-1,-1,-1},dy[]={1,1,0,-1,-1,-1,0,1}; in 阅读全文
摘要:
t1匹配 #include <bits/stdc++.h> using namespace std; int ans, sum, n; string s1, s2; int main(){ freopen("rotate.in", "r", stdin); freopen("rotate.out", 阅读全文
摘要:
t1 循环 #include<cstdio> using namespace std; int x,a=1;bool v[105]; int main(){ freopen("number.in","r",stdin); freopen("number.out","w",stdout); scanf 阅读全文
摘要:
t1学说话 #include<bits/stdc++.h> using namespace std; string str; int ans; int main() { // freopen("word.in","r",stdin); // freopen("word.out","w",stdout 阅读全文
摘要:
P5661 公交换乘 关键点在于题中说每次坐车开始时间都不重合,而且45分钟票就过期。所以理论上来讲,盒子里最多也就有45张没过期的票。大量的票都是已经过期了的,没必要从头扫一遍数组,在大量过期的票中浪费宝贵的青春。 #include<cstdio> using namespace std; int 阅读全文
摘要:
P1563 玩具谜题 #include<iostream> #include<cstdio> #include<cstring> using namespace std; struct node{int c;string st;}p[500005]; int n,m,dr,tp,k=1; int m 阅读全文
摘要:
P3955 图书管理员 P3956 棋盘 #include<iostream> #include<cstdio> #include<cmath> #include<cstring> using namespace std; int m,n,a[105][105], ans = 0x3fffffff, 阅读全文