02 2017 档案

摘要:第一场组队训练……意料之中的爆炸。 阅读全文
posted @ 2017-02-26 18:57 cxhscst2 阅读(156) 评论(0) 推荐(0)
摘要:题目链接 Cloud of Hashtags 题目还是比较简单的,直接贪心,但是因为我有两个细节没注意,所以FST了: 1、用了cin读入,但是没有加 std::ios::sync_with_stdio(false); 这条语句; 2、开了太多string。 也算是经验教训吧。 阅读全文
posted @ 2017-02-26 10:09 cxhscst2 阅读(497) 评论(0) 推荐(0)
摘要:题目链接 Alyona and Spreadsheet 记a[i][j]为读入的矩阵,c[i][j]为满足a[i][j],a[i - 1][j], a[i - 2][j],......,a[k][j]不上升的k的最小值。 d[i]为max(c[i][j]) (1 <= j <= m) 那么对于每次询 阅读全文
posted @ 2017-02-26 10:03 cxhscst2 阅读(322) 评论(0) 推荐(0)
摘要:题目链接 Coupons and Discounts 逐步贪心即可。 若当前位为奇数则当前位的下一位减一,否则不动。 阅读全文
posted @ 2017-02-25 12:06 cxhscst2 阅读(347) 评论(0) 推荐(0)
摘要:[Noi2014]起床困难综合症 Time Limit: 10 Sec Memory Limit: 512 MB Description 21 世纪,许多人得了一种奇怪的病:起床困难综合症,其临床表现为:起床难,起床后精神不佳。作为一名青春阳光好少年,atm 一直坚持与起床困难综合症作斗争。通过研究 阅读全文
posted @ 2017-02-20 20:28 cxhscst2 阅读(289) 评论(0) 推荐(0)
摘要:D. Chloe and pleasant prizes time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Generous sp 阅读全文
posted @ 2017-02-19 20:30 cxhscst2 阅读(366) 评论(0) 推荐(0)
摘要:题目链接 Game 题目的意思很简单, 就是要找一棵树权值最大等等前K条链。 在本题中,走的次数等于min(叶子结点个数,k) tree[i].sum意为从i号结点出发走到某个叶子结点能得到的最大总价值。 pson[i]表示i号结点若要获得最大价值那么下一步该怎么走。 显然tree[i].sum和p 阅读全文
posted @ 2017-02-17 18:56 cxhscst2 阅读(167) 评论(0) 推荐(0)
摘要:题目链接 Treats for the Cows 直接区间DP就好了,用记忆化搜索是很方便的。 阅读全文
posted @ 2017-02-16 16:52 cxhscst2 阅读(173) 评论(0) 推荐(0)
摘要:4300: 绝世好题 Description 给定一个长度为$n$的数列$ai$,求$ai$的子序列$bi$的最长长度,满足bi&bi-1!=0(2<=i<=len) 给定一个长度为$n$的数列$ai$,求$ai$的子序列$bi$的最长长度,满足bi&bi-1!=0(2<=i<=len) Input 阅读全文
posted @ 2017-02-16 16:49 cxhscst2 阅读(192) 评论(0) 推荐(0)
摘要:类似筛素数的方法……求出前缀和。然后直接O(1)回答即可。 阅读全文
posted @ 2017-02-15 21:30 cxhscst2 阅读(218) 评论(0) 推荐(0)
摘要:根据叉乘判断。 阅读全文
posted @ 2017-02-14 22:51 cxhscst2 阅读(198) 评论(0) 推荐(0)
摘要:相离,相切,相交,内含这几种情况都考虑了。 阅读全文
posted @ 2017-02-14 22:47 cxhscst2 阅读(2684) 评论(0) 推荐(0)
摘要:直接O(N^2)判断两线段是否相交即可。 阅读全文
posted @ 2017-02-14 22:46 cxhscst2 阅读(212) 评论(0) 推荐(0)
摘要:题目链接 Multipliers 阅读全文
posted @ 2017-02-14 13:17 cxhscst2 阅读(292) 评论(0) 推荐(0)
摘要:题目链接 Problem J 这道题思路还是很直观的,但是有两个难点: 1、题目中说$1<=NM<=10^{6}$,但没具体说明$N$和$M$的值,也就是可能出现: $N = 1, M = 1000000$ 这样的数据。 2、对每个查询的分类讨论。 #include <bits/stdc++.h> 阅读全文
posted @ 2017-02-13 10:27 cxhscst2 阅读(238) 评论(0) 推荐(0)
摘要:KI的目标 Time Limit: 2 Sec Memory Limit: 128 MB Submit: 308 Solved: 77 Description KI给自己制定了最近制定了一些学习目标,因为有些大目标的达到要先完成一些小目标,所以KI就下意识的把这些目标连成了一棵树,以1号目标为根。 阅读全文
posted @ 2017-02-13 10:01 cxhscst2 阅读(202) 评论(0) 推荐(0)
摘要:Circular Area Time Limit: 1000MS Memory Limit: 65536K Description Your task is to write a program, which, given two circles, calculates the area of th 阅读全文
posted @ 2017-02-13 09:48 cxhscst2 阅读(253) 评论(0) 推荐(0)
摘要:Problem H Problem Description 小边为了寻找梦寐以求的骨头误入一个迷宫,它灵敏的嗅觉告诉它,在迷宫中的某一处有一块完美的骨头.由于迷宫会在一段时间后关闭,所以小边必须在一定时间找到那块骨头,这样才能有充足的时间来带着骨头离开.小边在迷宫中可以从当前位置走到相邻的位置,每次 阅读全文
posted @ 2017-02-08 17:35 cxhscst2 阅读(193) 评论(0) 推荐(0)
摘要:题目链接 Dasha and Password 题目保证一定有解。 考虑到最多只有两行的指针需要移动,那么直接预处理出该行移动到字母数字或特殊符号的最小花费。 然后O(N^3)枚举求最小值即可。 时间复杂度O(N*M+N^3) 阅读全文
posted @ 2017-02-05 16:34 cxhscst2 阅读(327) 评论(0) 推荐(0)
摘要:题目链接 Dasha and Very Difficult Problem 求出ci的取值范围,按ci排名从小到大贪心即可。 需要注意的是,当当前的ci不满足在这个取值范围内的时候,判为无解。 阅读全文
posted @ 2017-02-05 16:28 cxhscst2 阅读(338) 评论(0) 推荐(0)
摘要:题目链接 Dasha and Puzzle 对于无解的情况:若存在一个点入度大于4,那么直接判断无解。 从根结点出发(假设根结点的深度为0), 深度为0的节点到深度为1的节点的这些边长度为2^30, 深度为1的节点到深度为2的节点的这些边的长度为2^29, 阅读全文
posted @ 2017-02-05 16:21 cxhscst2 阅读(399) 评论(0) 推荐(0)