题目链接:https://codeforces.com/contest/1369/problem/E 题意 Lee 有 $n$ 种不同种类的食物和 $m$ 个朋友,每种食物有 $w_i$ 个,每个朋友喜欢吃两种食物 $x_i, y_i$,如果一个朋友被叫去厨房时一个喜欢吃的食物也没有,他就会吃掉 L ...
分类:
其他好文 时间:
2020-06-24 22:07:53
阅读次数:
71
题目链接:https://codeforces.com/contest/1369/problem/D 题意 最初有一个结点,衍生规则如下: 如果结点 $u$ 没有子结点,添加 $1$ 个子结点 如果结点 $u$ 有 $1$ 个子结点,添加 $2$ 个子结点 如果结点 $u$ 有 $3$ 个子结点,跳 ...
分类:
其他好文 时间:
2020-06-24 21:44:40
阅读次数:
77
题目链接:https://codeforces.com/contest/1369/problem/C 题意 将 $n$ 个数分给 $k$ 个人,每个人分 $w_i$ 个数($\sum_{i = 1}^{k}w_i = n$),每个人的快乐值为分到数的最小值和最大值之和,计算所有人快乐值之和的最大值。 ...
分类:
其他好文 时间:
2020-06-24 21:38:59
阅读次数:
59
题目链接:https://codeforces.com/contest/1369/problem/A 题意 判断正 $n$ 边形能否通过旋转使得一边与 $x$ 轴平行,一边与 $y$ 轴平行。 题解 符合条件的正 $n$ 边形一定可以像正方形一样被两个对称轴 $4$ 等分,即总的边数为 $4$ 的倍 ...
分类:
其他好文 时间:
2020-06-24 21:28:20
阅读次数:
36
The end of the school year is near and Ms. Manana, the teacher, will soon have to say goodbye to a yet another class. She decided to prepare a goodbye ...
分类:
其他好文 时间:
2020-06-23 21:45:00
阅读次数:
111
题目链接:https://codeforces.com/contest/1370/problem/C 题意 给出一个正整数 $n$,Ashishgup 和 FastestFinger 依次选择执行以下一个操作: 如果 $n > 1$,使 $n$ 除以一个奇因子 如果 $n > 1$,使 $n$ 减一 ...
分类:
其他好文 时间:
2020-06-21 19:40:19
阅读次数:
44
题目链接 点我呀 翻译 给你一个拼图, 问你能不能把它拼成一个 \(n \times m\) 的方格图。 题解 会发现, 只有 $2 \times 2$ 的能拼出来, 或者是一个长条形的。 往下或者往右一直延伸这样, 然后宽度或高度为1。 代码 #include<bits/stdc++.h> #de ...
分类:
其他好文 时间:
2020-06-21 19:26:05
阅读次数:
45
题目链接:https://codeforces.com/contest/1370/problem/D 题意 给出一个含有 $n$ 个数的数组 $a$,从中选出 $k$ 个数组成子序列 $s$,使得 $min(max(s_1, s_3, s_5, \ldots), max(s_2, s_4, s_6, ...
分类:
其他好文 时间:
2020-06-21 19:25:33
阅读次数:
85
题意:对于正整数$n$,每次可以选择使它变为$n-1$或者$n/t$ ($n\ mod\ t=0$且$t$为奇数),当$n=1$时便不可以再取,问先手赢还是后手赢. 题解:首先特判$1$和$2$的情况,然后显然如果$n$是奇数,一定是先手赢. ? 如果$n$是偶数,那么我们去找它的奇数因子. ? 如 ...
分类:
其他好文 时间:
2020-06-21 15:56:29
阅读次数:
60
#include<map> #include<queue> #include<time.h> #include<limits.h> #include<cmath> #include<ostream> #include<iterator> #include<set> #include<stack> # ...
分类:
其他好文 时间:
2020-06-21 14:20:23
阅读次数:
58