Codeforces Round #694 (Div. 2)】的更多相关文章

 A. Strange Partition 题意:就是求最小和最大的bi/x向上取整的和. 思路:见题解:https://blog.csdn.net/qq_45900709/article/details/112341661 当时没想到的:就是不是说能够代替,不应该是平均以后再向上取整吗,尤其是等式的后一部分 代码: 1 #include<iostream> 2 #include<algorithm> 3 #include<cstring> 4 #include<…
题目链接:Codeforces Round #433 (Div. 2) codeforces 854 A. Fraction[水] 题意:已知分子与分母的和,求分子小于分母的 最大的最简分数. #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int gcd(int a,int b){return b?gcd(b…
A. Drazil and Factorial 题目连接: http://codeforces.com/contest/516/problem/A Description Drazil is playing a math game with Varda. Let's define for positive integer x as a product of factorials of its digits. For example, . First, they choose a decimal…
B. Ohana Cleans Up   Ohana Matsumae is trying to clean a room, which is divided up into an n by n grid of squares. Each square is initially either clean or dirty. Ohana can sweep her broom over columns of the grid. Her broom is very strange: if she s…
本题地址: https://codeforces.com/contest/1215/problem/B 本场比赛A题题解:https://www.cnblogs.com/liyexin/p/11535519.html B. The Number of Products time limit per test 2 seconds memory limit per test 256 megabytes input standard input output   standard output You…
题:https://codeforces.com/contest/1072/problem/C 思路:首先找到最大的x,使得x*(x+1)/2 <= a+b 那么一定存在一种分割使得 a1 <= a 且 b1 <= b 证明: 从x 到 1枚举过去,对于某个i 如果 a >= i, 那么这个i放在第一天 如果a < i,那么后面肯定会遇到一个a把第一天填满(因为我们是从大到小枚举的) 所以第一天可以填满,那么除了第一天剩下的加起来也小于等于b #include<bits…
题目链接:https://codeforces.ml/contest/1702/problem/E 题目大意: 每张牌上面有两个数字,现在有n张牌(n为偶数),问能否将这n张牌分成两堆,使得每堆牌中的数字不重复: 因为需要每堆牌不重复,那牌中的数字必须满足: 1.每个数字出现的次数刚好为2 2.同一张牌上出现的数字不同 因为每张牌上有两个数字,所以我们可以将每张牌连成一个环,然后对每张牌进行涂色,如果包含相同数字的牌被涂成了相同的颜色, 说明无论如何都不可能分为两堆: 1 # include<i…
题目:Report 题意:有两种操作: 1)t = 1,前r个数字按升序排列:   2)t = 2,前r个数字按降序排列: 求执行m次操作后的排列顺序. #include <iostream> #include <algorithm> #include <stdlib.h> #include <time.h> #include <cmath> #include <cstdio> #include <string> #inc…
题目链接:http://codeforces.com/contest/1064/problem/D 题目大意:给你一个n*m的图,图中包含两种符号,'.'表示可以行走,'*'表示障碍物不能行走,规定最多只能向左走L个格子,向右R个格子,但是上下没有限制,现在给出出发点坐标(sx,sy),求能走的最大单元格数目. Examples Input Copy 4 53 21 2......***....***.... Output Copy 10 Input Copy 4 42 20 1......*.…
A. Vasya and Football 题目连接: http://codeforces.com/contest/493/problem/A Description Vasya has started watching football games. He has learned that for some fouls the players receive yellow cards, and for some fouls they receive red cards. A player wh…