摘要: 题目链接:http://codeforces.com/problemset/problem/612/B 解题思路: 一开始看错了题意,他要求的是从1-n所耗费的时间,n表示的是数值而不是下标, 实现代码: 阅读全文
posted @ 2017-07-07 10:34 冥想选手 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/contest/611/problem/C 解题思路: 分别对矩阵横竖遍历,满足条件则加1,不满足则不变,先将整个矩阵都标记完,然后只要输出起点和终点数值的差值就行。有点动态规划的感觉。 阅读全文
posted @ 2017-07-06 19:54 冥想选手 阅读(139) 评论(0) 推荐(0) 编辑
摘要: There are N jobs to be finished. It takes a robot 1 hour to finish one job. At the beginning you have only one robot. Luckily a robot may build more r 阅读全文
posted @ 2017-07-06 16:33 冥想选手 阅读(188) 评论(0) 推荐(0) 编辑
摘要: You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dict 阅读全文
posted @ 2017-07-06 16:28 冥想选手 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/problemset/problem/611/B 解题思路: 直接暴力推出所有符合条件的。 由进制转换可以知道,二进制只有1个0也就是十进制减去前面任意一个2的次方 然后脑残一样的用了位运算,死都无法表示64位,只能32位,还以为电脑出问题了。。 阅读全文
posted @ 2017-07-06 16:19 冥想选手 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/contest/610/problem/C 解题思路: 将后一个矩阵拆分为四个前一状态矩阵,其中三个与前一状态相同,剩下一个直接取反就行。还有很多种取法,这种比较方便就是。 实现代码: 阅读全文
posted @ 2017-07-06 14:39 冥想选手 阅读(175) 评论(0) 推荐(0) 编辑
摘要: B. Vika and Squares time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Vika and Squares 阅读全文
posted @ 2017-07-06 11:40 冥想选手 阅读(326) 评论(0) 推荐(0) 编辑
摘要: C. Load Balancing time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Load Balancing time 阅读全文
posted @ 2017-07-06 00:01 冥想选手 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,g 阅读全文
posted @ 2017-07-05 20:50 冥想选手 阅读(167) 评论(0) 推荐(0) 编辑
摘要: B. Arpa’s obvious problem and Mehrdad’s terrible solution time limit per test 1 second memory limit per test 256 megabytes input standard input output 阅读全文
posted @ 2017-07-04 14:25 冥想选手 阅读(134) 评论(0) 推荐(0) 编辑