2017年3月17日

SCAU 还有两个东西 —— 异或

摘要: 竞赛题 F 还有两个东西 Time Limit:400MS Memory Limit:65535K 题型: 编程题 语言: 无限制 描述 输入格式 输出格式 输入样例 输出样例 由于时间条件苛刻,排序的方法nlogn的方法也过不了,只能用n的方法。 这里利用到异或: 1.一个数异或0等于它本身 2. 阅读全文

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

SCAU RP Test —— 因式分解与组合

摘要: D RP Test Time Limit:1000MS Memory Limit:65535K 题型: 编程题 语言: 无限制 描述 输入格式 输出格式 输入样例 输出样例 Hint 题解: 表格是有两个数组a,b的乘积构成的,要求找出能够被c整除的子矩阵个数。直接构造表格,然后枚举。这种做法肯定会 阅读全文

posted @ 2017-03-17 16:54 h_z_cong 阅读(262) 评论(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 阅读(205) 评论(0) 推荐(0)

BestCoder Round #92 1001 Skip the Class —— 字典树 or map容器

摘要: 题目链接:http://bestcoder.hdu.edu.cn/contests/contest_showproblem.php?cid=748&pid=1001 题解: 1.trie树 关键是如何将科目与分数进行对应,即如果将字符串与数字对应。由于之前解除了字典树,所以就想到用字典树存储单词,并 阅读全文

posted @ 2017-03-17 14:42 h_z_cong 阅读(257) 评论(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 阅读(285) 评论(0) 推荐(0)

Codeforces Round #401 (Div. 2) D Cloud of Hashtags —— 字符串

摘要: 题目链接:http://codeforces.com/contest/777/problem/D 题解: 题意:给出n行字符串,对其进行字典序剪辑。我自己的想法是正向剪辑的,即先对第一第二个字符串进行剪辑,但是这样却不能保证前面的操作是正确的,当后面突然出现一个字典序很小的字符串,那么前面的操作将非 阅读全文

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

Codeforces Round #402 (Div. 2) D String Game —— 二分法

摘要: D. String Game time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output D. String Game time limit 阅读全文

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

导航