随笔分类 -  模拟题

Parenthesis UVALive - 4882 删除不必要的括号序列,模拟题 + 数据
摘要:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2883 题目就是要求把多余的括号序列删了,一直wa 我的思路是暴力,暴力枚举每一对括号,在其 阅读全文

posted @ 2017-03-15 16:52 stupid_one 阅读(218) 评论(0) 推荐(0) 编辑

A. The Fault in Our Cubes 暴力dfs
摘要:http://codeforces.com/gym/101257/problem/A 把它固定在(0,0, 0)到(2, 2, 2)上,每次都暴力dfs检查,不会超时的,因为规定在这个空间上,一不行,就会早早退出。 这样写起来比较好写。 #include <cstdio> #include <cst 阅读全文

posted @ 2017-02-18 23:10 stupid_one 阅读(171) 评论(0) 推荐(0) 编辑

Atcoder B - Boxes 玄学 + 数学
摘要:http://agc010.contest.atcoder.jp/tasks/agc010_b 预处理出每两个相邻的数的差值,那么首先知道是一共取了sum / ((1 + n) * n / 2)次,因为每一次固定要取这么多,所以这个就是操作次数。 然后观察到,每一次操作,都是把dis[]数组的n - 阅读全文

posted @ 2017-02-06 22:04 stupid_one 阅读(182) 评论(0) 推荐(0) 编辑

E. Comments dfs模拟
摘要:http://codeforces.com/contest/747/problem/E 首先,把字符串变成这个样子。 hello,2,ok,0,bye,0,test,0,one,1,two,2,a,0,b,0 hello 2 1ok 0 2bye 0 3test 0 4one 1 5two 2 6a 阅读全文

posted @ 2016-12-19 13:47 stupid_one 阅读(152) 评论(0) 推荐(0) 编辑

L 裁纸片 贪心 + 模拟
摘要:https://biancheng.love/contest-ng/index.html#/123/problems 如果只是输出最小的值,那么好办,a升序,b降序,这样是最优的。 但是需要次数,这就麻烦了。 但是注意到它说数字互不相同。 那么,用个数组book[a[i]]表示a[i]需要匹配的是那 阅读全文

posted @ 2016-12-12 11:06 stupid_one 阅读(172) 评论(0) 推荐(0) 编辑

Problem E: 穷游中国在统题 优先队列 + 模拟
摘要:http://www.gdutcode.sinaapp.com/problem.php?cid=1049&pid=4 Problem E: 穷游中国在统题 Description Travel_poorly队是广工大目前最年轻的金牌队伍,队内成员分别是tmk、YFQ、Maple。这天他们接到教练的o 阅读全文

posted @ 2016-12-04 16:48 stupid_one 阅读(472) 评论(0) 推荐(0) 编辑

D. Anton and Chess 模拟题 + 读题
摘要:http://codeforces.com/contest/734/problem/D 一开始的时候看不懂题目,以为象是中国象棋那样走,然后看不懂样例。 原来是走对角线的,长知识了。 所以我们就知道,王有八个方向,所以每个方向选一个来做代表就行了。 那么选谁呢?可以排序,按照他们离王的距离从小到大排 阅读全文

posted @ 2016-11-16 10:01 stupid_one 阅读(172) 评论(0) 推荐(0) 编辑

18002 Z-Scan 模拟题
摘要:18002 Z-Scan 时间限制:1000MS 内存限制:65535K提交次数:0 通过次数:0 题型: 编程题 语言: 不限定 Description 输入格式 The first line is an integer N, the number of cases, 1<=N<=10 N lin 阅读全文

posted @ 2016-11-11 13:00 stupid_one 阅读(345) 评论(0) 推荐(0) 编辑

ztr loves lucky numbers 傻逼的我来了个大模拟
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5676 这题的正解因该是dfs的,但是有18个位,然后我一算,全排列的话,有18!个啊,那不是很大?但是有很多是相同的,因为4477和第一个和第二个数字调转的结果是一样的。 先说说我模拟的方法。 真的很麻烦,不想看 阅读全文

posted @ 2016-11-10 15:41 stupid_one 阅读(269) 评论(0) 推荐(0) 编辑

Canada Cup 2016 D. Contest Balloons 好题。优先队列 + 简单贪心
摘要:http://codeforces.com/contest/725/problem/D 这题一看就是贪心的了,w - t最小的那个,肯定是优先打死。 但是一直都不会写,为什么呢,因为这个太像二分答案了,一看到这题就想到了二分答案,二分排名,二分扔掉气球...... 但是是不行的啊。因为扔掉n个,可能 阅读全文

posted @ 2016-11-02 14:15 stupid_one 阅读(185) 评论(0) 推荐(0) 编辑

C. Epidemic in Monstropolis
摘要:http://codeforces.com/contest/733/problem/C 一道很恶心的模拟题。 注意到如果能凑成b[1],那么a的前缀和一定是有一个满足是b[1]的,因为,如果跳过了一些前面的数不用,就会剩下一个多余的东西在哪里。所以就是把a数组分成了若干段,判断每一段是否凑成b[i] 阅读全文

posted @ 2016-11-02 11:57 stupid_one 阅读(203) 评论(0) 推荐(0) 编辑

hihoCoder 1383 : The Book List 北京网络赛
摘要:http://hihocoder.com/problemset/problem/1383?sid=950389 #1383 : The Book List #1383 : The Book List 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 The history 阅读全文

posted @ 2016-10-29 23:16 stupid_one 阅读(276) 评论(0) 推荐(0) 编辑

Canada Cup 2016 C. Hidden Word 构造模拟题
摘要:http://codeforces.com/contest/725/problem/C Each English letter occurs at least once in s. 注意到题目有这样一句话,那么就是说S中只有一个重复的字母。一定要看到这句话,不然做不了。 然后就找到pos1和pos2 阅读全文

posted @ 2016-10-23 09:10 stupid_one 阅读(272) 评论(0) 推荐(0) 编辑

Codeforces Round #377 (Div. 2) E. Sockets
摘要:http://codeforces.com/contest/732/problem/E 题目说得很清楚,每个电脑去插一个插座,然后要刚好的,电脑的power和sockets的值相同才行。 如果不同,还有一个操作,就是在sockets中插东西,使得sockets的值变成val / 2 + (val & 阅读全文

posted @ 2016-10-22 20:34 stupid_one 阅读(210) 评论(0) 推荐(0) 编辑

Codeforces Round #377 (Div. 2) D. Exams 贪心 + 简单模拟
摘要:http://codeforces.com/contest/732/problem/D 这题我发现很多人用二分答案,但是是不用的。 我们统计一个数值all表示要准备考试的所有日子和。+m(这些时间用来考试) 那么这个all值就是理想的最小值。然后去前all个数找,贪心地复习最小的科目,然后有的考试的 阅读全文

posted @ 2016-10-18 10:00 stupid_one 阅读(234) 评论(0) 推荐(0) 编辑

Codeforces Round #375 (Div. 2) Polycarp at the Radio 优先队列模拟题 + 贪心
摘要:http://codeforces.com/contest/723/problem/C 题目是给出一个序列 a[i]表示第i个歌曲是第a[i]个人演唱,现在选出前m个人,记b[j]表示第j个人演唱歌曲的数量, 现在你可以改变a[]这个数组,使得前m个人的演唱歌曲的数量的最小值最大。 很明显对于前m个 阅读全文

posted @ 2016-10-03 22:51 stupid_one 阅读(178) 评论(0) 推荐(0) 编辑

A -- A. Quailty and Playing Cards 模拟 + 思考
摘要:http://www.ifrog.cc/acm/problem/1036?contest=1005&no=0 分类,考虑Q神出的是第一张或者是第二张,然后对手出那些牌来应付。 Q神出第一张和第二张的情况是分开的,应该取两者的最大值。(因为要取最优情况) 而Q神出第一张的时候,对手出任意一张,是取mi 阅读全文

posted @ 2016-09-25 13:09 stupid_one 阅读(254) 评论(0) 推荐(0) 编辑

C A Simple Job
摘要:题目3 : A Simple Job时间限制:1000ms单点时限:1000ms内存限制:256MB描述Institute of Computational Linguistics (ICL), Peking University is an interdisciplinary institute 阅读全文

posted @ 2016-09-24 17:01 stupid_one 阅读(210) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示