02 2019 档案

摘要:题目链接:http://codeforces.com/problemset/problem/1108/D time limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standar 阅读全文
posted @ 2019-02-28 23:59 Dilthey 阅读(501) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://www.luogu.org/problemnew/show/P1309 题解: 每次比赛前,每个人都是按照分数降序排好的,那么比赛完后,将选手按输赢分成两组,顺序依然按照原顺序,那么显然组内的分数依然是降序的。只要将两个组重新 $O(n)$ 合并即可。 这种合并类似于归并排 阅读全文
posted @ 2019-02-28 23:32 Dilthey 阅读(223) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://zhixincode.com/contest/14/problem/D?problem_id=206 样例输入 1 5 5 1 2 1 1 3 1 2 4 1 2 5 1 1 5 1 样例输出 1 20 样例输入 1 5 5 1 2 1 1 3 1 2 4 1 2 5 1 阅读全文
posted @ 2019-02-28 22:31 Dilthey 阅读(238) 评论(0) 推荐(0) 编辑
摘要:链接:http://codeforces.com/contest/1114 A - Got Any Grapes? 题意:甲乙丙三个人吃葡萄,总共有三种葡萄:绿葡萄、紫葡萄和黑葡萄,甲乙丙三个人至少要各自吃 $x,y,z$ 个葡萄,又甲只吃绿葡萄,乙不吃黑葡萄,丙三种颜色都吃。现在总共有 $a$ 个 阅读全文
posted @ 2019-02-26 22:10 Dilthey 阅读(311) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://zhixincode.com/contest/14/problem/I?problem_id=211 样例输入 1 样例输出 1 27 9 6 样例输出 1 题解: 首先,比较明显地是,每进行一次操作 $1$,对于目前的卡牌分配情况的种数,其中的 $1/3$ 种是被撤掉位子 阅读全文
posted @ 2019-02-25 22:53 Dilthey 阅读(433) 评论(1) 推荐(0) 编辑
摘要:题目链接:https://zhixincode.com/contest/14/problem/A?problem_id=203 time limit per test: 1 secondmemory limit per test: 256 megabytesinput: standard input 阅读全文
posted @ 2019-02-25 20:25 Dilthey 阅读(146) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://zhixincode.com/contest/3/problem/F?problem_id=39 样例输入 1 样例输出 1 6 样例输出 1 题解: 这个体力感觉跟势能是个差不多的东西……很显然,如果没有降低山峰的能力,wls最多只能爬高度为 $h[1]+k$ 的山,更高 阅读全文
posted @ 2019-02-24 23:07 Dilthey 阅读(203) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://zhixincode.com/contest/3/problem/J?problem_id=43 样例输入 1 4 1110 11 110 21 210 31 315 415 415 415 415 4 样例输出 1 28 题解: 首先是有个简单的想法,假设wls买完后,$ 阅读全文
posted @ 2019-02-24 22:31 Dilthey 阅读(259) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://zhixincode.com/contest/18/problem/I?problem_id=267 题目描述 输入描述 输出描述 一行一个整数表示答案。 样例输入 1 320 115 1020 2 样例输出 1 60 题解: 首先肯定的是,这 $n$ 次选择必然是分为两段 阅读全文
posted @ 2019-02-20 23:41 Dilthey 阅读(202) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://zhixincode.com/contest/18/problem/G?problem_id=265 题目描述 wls有一个整数 $n$,他想请你算一下有多少 $1...n$ 的排列(permutation)满足:对于所有的 $i(2 \le i \le n)$,若 $i$ 阅读全文
posted @ 2019-02-20 16:19 Dilthey 阅读(126) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://zhixincode.com/contest/18/problem/C?problem_id=261 样例输入 1 4 21 23 4 样例输出 1 Yes 样例输入 2 4 31 22 33 4 样例输出 2 No 题解: 判断一个边集是否为最小边覆盖,用最笨的方法,暴力 阅读全文
posted @ 2019-02-15 15:26 Dilthey 阅读(185) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://zhixincode.com/contest/18/problem/A?problem_id=259 题目描述 wls正在玩一个寻宝游戏。 宝藏一共有 $n$ 种,都藏在一个 $m$ 行 $m$ 列的网格中。 每种宝藏都恰好有两个。 wls只能沿着网格走(上下左右四个方向) 阅读全文
posted @ 2019-02-15 14:05 Dilthey 阅读(223) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://zhixincode.com/contest/22/problem/I?problem_id=314 样例输入 1 5 9 31 5 3 2 41 1 52 1 51 1 11 2 21 3 31 4 41 5 53 3 51 1 4 样例输出 1 151325413 题解 阅读全文
posted @ 2019-02-15 13:08 Dilthey 阅读(209) 评论(0) 推荐(0) 编辑