摘要: 比赛链接: "2016 ICPC Mid Central USA Region" 题目链接: "Windy Path" Description Consider following along the path in the figure above, starting from $(4,4)$ an 阅读全文
posted @ 2019-08-13 19:47 wuli涛涛 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Description You have $N$ integers, $A_1, A_2, ... , A_N$. You need to deal with two kinds of operations. One type of operation is to add some given nu 阅读全文
posted @ 2019-08-12 22:30 wuli涛涛 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 2019 杭电多校 7 1006 题目链接: "HDU 6651" 比赛链接: "2019 Multi University Training Contest 7" Problem Description Final Exam is coming! Cuber QQ has now one nigh 阅读全文
posted @ 2019-08-12 20:43 wuli涛涛 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "Watch Where You Step" 题意 给定有向图的邻接矩阵,现在需要给该图增加边,使得如果两点可达必直接可达,求需要加边的数量。 题解 首先,如果给定 $n$ 个结点的图中任意两点均可达,那么需要增加的边数为有向完全图的边数 $n (n 1) $ 原来有的边数。 所以先将图 阅读全文
posted @ 2019-08-12 10:48 wuli涛涛 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "Coins" Description Alice and Bob are playing a simple game. They line up a row of nn identical coins, all with the heads facing down onto the t 阅读全文
posted @ 2019-08-10 20:37 wuli涛涛 阅读(197) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-08-09 22:54 wuli涛涛 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "HDU 1548" Description There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 Here comes the probl 阅读全文
posted @ 2019-08-06 21:41 wuli涛涛 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "HDU 2266" Description Now give you an string which only contains 0, 1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9.You are asked to add the sign ‘+’ or ’ ’ between 阅读全文
posted @ 2019-08-06 21:40 wuli涛涛 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "POJ 3641" Description Fermat's theorem states that for any prime number p and for any integer a 1, ap = a (mod p). That is, if we raise a to th 阅读全文
posted @ 2019-08-06 21:39 wuli涛涛 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "POJ 1995" Description People are different. Some secretly read magazines full of interesting girls' pictures, others create an A bomb in their 阅读全文
posted @ 2019-08-06 20:16 wuli涛涛 阅读(198) 评论(0) 推荐(0) 编辑