参考博客:http://www.cnblogs.com/chendl111/p/6891770.html 题目链接:https://www.icpc.camp/contests/4mYguiUR8k0GKE Parentheses Input The input contains zero or more test cases and is terminated by end-of-file. For each test case: The first line contains an inte…
链接:https://www.icpc.camp/contests/4mYguiUR8k0GKE Partial Sum Input The input contains zero or more test cases and is terminated by end-of-file. For each test case: The first line contains three integers n, m, C. The second line contains n integers a1…
链接:https://www.icpc.camp/contests/4mYguiUR8k0GKE H. Highway The input contains zero or more test cases and is terminated by end-of-file. For each test case: The first line contains an integer n. The i-th of the following (n − 1) lines contains three…
2017江苏省赛的E题,当时在场上看错了题目没做出来,现在补一下…… 题目链接:http://202.197.224.59/OnlineJudge2/index.php/Problem/read/id/1264(注意在上面使用G++编译的话,请使用%I64d) Time Limit : 3000 MS Memory Limit : 65536 KB Bobo has a integer sequence a1,a2,…,an of length n. Each time, he selects…
这道题可能有毒……总之一会儿能过一会儿不能过的,搞的我很心烦…… 依然是上次2017江苏省赛的题目,之前期末考试结束了之后有想补一下这道题,当时比较懵逼不知道怎么做……看了题解也不是很懂……就只好放弃了. 后来暑假里学了树形DP,做到了一道有关树的直径的题,把相关方面的知识点算是补了一下,不过当时没想起来这道题目. 今天白天(或者说昨天白天?太晚了233333)学了些有关最大流最小割的东西,想补一下省赛的B题(因为看题解上说的是在网络流……),然而发现题目都有点看不懂,简直不知道发生了什么……正…
G - 贪心 Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %llu Submit Status Description   Simon and Garfunkel Corporation (SG Corp.) is a large steel-making company with thousand of customers. Keeping the customer satisfied is one of…
是2017江苏省赛的第一题,当时在场上没做出来(废话,那个时候又不懂高斯消元怎么写……而且数论也学得一塌糊涂,现在回来补了) 省赛结束之后,题解pdf就出来了,一看题解,嗯……加一行再求逆矩阵从而得到伴随矩阵从而得到答案,emmmmm真是非常通俗易懂呢! 于是在回学校的路上强行回忆上学期学的线性代数,把这题题解的原理想通了,然后到现在把高斯消元法补了,才把这题做出来…… #include<cstdio> #include<algorithm> #define MAXN 205 #d…
之前在网上搜了一个下午没搜到这道题的题解,然后同时又对着叉姐写的两行字题解看了一个下午: 虽然基本上已经知道了这题的思路,但愣是因为自己代码实现起来太繁复,外加不确定正确性,没敢码…… 但是一道题肝了一下午没肝出来,就要放弃的话,怕是太扎心了,忍不住就跑去ICPCCamp.Post问叉姐了(https://post.icpc-camp.org/d/715-2017-b-roads) 看了叉姐的对于我的几个问题的回复,我总算肯定了我的思路,而且叉姐还在下面给了标程,当时可以说心情非常愉悦: 听起来…
HDU – 6282 http://acm.hdu.edu.cn/showproblem.php?pid=6282 by Hzu_Tested 题意:给出两个字符串S和T,只由a,b,c三种字符组成(不为空串,长度不一定相同,不一定包含所有字符).对字符串S可以进行几种操作:在任意位置添加/删除字符串aa,bb,abab.问字符串S是否能通过以上几种操作变成T,输出Yes/No. 思路:字符串变化的问题,先找出所有可行的操作:添加/删除aa,bb,abab,即只能添加/删除偶数个a/b,无法添加…
DreamGrid has a nonnegative integer . He would like to divide  into nonnegative integers  and minimizes their bitwise or (i.e.  and  should be as small as possible). Input There are multiple test cases. The first line of input contains an integer , i…