随笔分类 -  其他算法 —— 杂题

CodeForces - 540B School Marks —— 贪心
摘要:题目链接:https://vjudge.net/contest/226823#problem/B Little Vova studies programming in an elite school. Vova and his classmates are supposed to write n p 阅读全文

posted @ 2018-05-05 17:36 h_z_cong 阅读(196) 评论(0) 推荐(0)

CodeForces - 552E Vanya and Brackets —— 加与乘运算的组合
摘要:题目链接:https://vjudge.net/contest/224393#problem/E Vanya is doing his maths homework. He has an expression of form , where x1, x2, ..., xn are digits fr 阅读全文

posted @ 2018-05-05 17:35 h_z_cong 阅读(295) 评论(0) 推荐(0)

Codeforces Round #423 (Div. 2, rated, based on VK Cup Finals)
摘要:题目链接:http://codeforces.com/contest/828 A. Restaurant Tables time limit per test 1 second memory limit per test 256 megabytes input standard input outp 阅读全文

posted @ 2018-04-22 21:18 h_z_cong 阅读(5106) 评论(0) 推荐(0)

Codeforces Round #467 (Div. 2)
摘要:题目链接:http://codeforces.com/contest/937 B. Vile Grasshoppers time limit per test 1 second memory limit per test 256 megabytes input standard input outp 阅读全文

posted @ 2018-04-21 17:13 h_z_cong 阅读(264) 评论(0) 推荐(0)

Codeforces Round #461 (Div. 2) B C D
摘要:题目链接:http://codeforces.com/contest/922 B. Magic Forest time limit per test 1 second memory limit per test 256 megabytes input standard input output st 阅读全文

posted @ 2018-03-19 19:29 h_z_cong 阅读(185) 评论(0) 推荐(0)

Codeforces Round #394 (Div. 2) C. Dasha and Password —— 枚举
摘要:题目链接:http://codeforces.com/problemset/problem/761/C C. Dasha and Password time limit per test 2 seconds memory limit per test 256 megabytes input stan 阅读全文

posted @ 2017-07-08 21:51 h_z_cong 阅读(178) 评论(0) 推荐(0)

Codeforces Round #304 (Div. 2) C. Soldier and Cards —— 模拟题,队列
摘要:题目链接:http://codeforces.com/problemset/problem/546/C 题解: 用两个队列模拟过程就可以了。 特殊的地方是:1.如果等大,那么两张牌都丢弃 ; 2.如果操作了很多次仍不能分出胜负,则认为平手。(至于多少次,我也不知道,只能写大一点碰运气,但要防止超时) 阅读全文

posted @ 2017-03-24 15:15 h_z_cong 阅读(134) 评论(0) 推荐(0)

BestCoder Round #92 1002 Count the Sheep —— 枚举+技巧
摘要:题目链接:http://bestcoder.hdu.edu.cn/contests/contest_showproblem.php?cid=748&pid=1002 题解: 做题的时候只是想到用dfs暴搜,结果超时了。(刚学dfs时以为它无所不能,后来渐渐不太喜欢了,因为太暴力了,经常超时) TLE 阅读全文

posted @ 2017-03-17 14:47 h_z_cong 阅读(207) 评论(0) 推荐(0)

Codeforces Round #401 (Div. 2) C Alyona and Spreadsheet —— 打表
摘要:题目链接:http://codeforces.com/contest/777/problem/C C. Alyona and Spreadsheet time limit per test 1 second memory limit per test 256 megabytes input stan 阅读全文

posted @ 2017-03-17 14:31 h_z_cong 阅读(286) 评论(0) 推荐(0)

poj2586 Y2K Accounting Bug —— 枚举
摘要:链接:http://poj.org/problem?id=2586 题意:大意是一个公司在12个月中,或固定盈余s,或固定亏损d.但记不得哪些月盈余,哪些月亏损,只能记得连续5个月的代数和总是亏损(和<0算亏损),问全年是否可能盈利?若可能,输出可能最大盈利金额,否则输出“Deficit". 题解: 阅读全文

posted @ 2017-02-12 10:59 h_z_cong 阅读(198) 评论(0) 推荐(0)

导航