摘要:
题目链接:https://zhixincode.com/contest/3/problem/F?problem_id=39 样例输入 1 样例输出 1 6 样例输出 1 题解: 这个体力感觉跟势能是个差不多的东西……很显然,如果没有降低山峰的能力,wls最多只能爬高度为 $h[1]+k$ 的山,更高 阅读全文
摘要:
题目链接: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买完后,$ 阅读全文
摘要:
题目链接:https://zhixincode.com/contest/18/problem/I?problem_id=267 题目描述 输入描述 输出描述 一行一个整数表示答案。 样例输入 1 320 115 1020 2 样例输出 1 60 题解: 首先肯定的是,这 $n$ 次选择必然是分为两段 阅读全文
摘要:
题目链接:https://zhixincode.com/contest/18/problem/G?problem_id=265 题目描述 wls有一个整数 $n$,他想请你算一下有多少 $1...n$ 的排列(permutation)满足:对于所有的 $i(2 \le i \le n)$,若 $i$ 阅读全文
摘要:
题目链接: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 题解: 判断一个边集是否为最小边覆盖,用最笨的方法,暴力 阅读全文
摘要:
题目链接:https://zhixincode.com/contest/18/problem/A?problem_id=259 题目描述 wls正在玩一个寻宝游戏。 宝藏一共有 $n$ 种,都藏在一个 $m$ 行 $m$ 列的网格中。 每种宝藏都恰好有两个。 wls只能沿着网格走(上下左右四个方向) 阅读全文
摘要:
题目链接: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 题解 阅读全文