left_right_2022
left_right_2022
全部文章
分类
题解(45)
归档
标签
去牛客网
登录
/
注册
left_right_2022的博客
全部文章
(共20篇)
Codeforces 1521A.Nastia and Nearly Good Numbers
题意:找三个数x,y,z,有下面两个条件:1.这个数可以整除ab2.不满足1.且这个数可以整除a;要求x,y,z中恰有1个满足1,另外两个满足2,且x+y=z.能找到就输出YES并依次输出这三个数,不能则输出NO 设正整数k,m,有ak+a(bm)=a(bm+k)令ak%ab!=0,a(bm+k)%...
简单数论
数学
2021-05-09
0
726
Codeforces 1519B.The Cake Is a Lie
题意:初始时在(1,1),目标(n,m)位于(x,y)时,每一步只有两种情况:走到(x,y+1),代价为x走到(x+1,y),代价为y问从(1,1)到(n,m)能否花费代价恰好为k 只需判断n×m-1是否等于k大胆猜测小心使用不用证明其实我们发现,从(x,y)走到(x+1,y+1)只有两种走法,且代...
贪心
数学
2021-04-30
0
842
Codeforces 1519A.Red and Blue Beans
题意:有两种豆,若干个袋子,每个袋子里的豆满足两个限制:1.至少放每种豆各一个2.两种豆的个数差不超过d问能否用完所有的豆子。 令x为较少的豆数,y为较多的豆数。当x,y相等时肯定满足,x,y不等时就要用较少的那种尽可能多的消耗较多的那种。令某袋里有1个少的,1+d个多的,这样消耗最快。当然可以选择...
数学
2021-04-30
0
767
ZZUACM 2021 省赛训练 2 A-Equalize Prices Again
You are both a shop keeper and a shop assistant at a small nearby shop. You have n goods, the i-th good costs ai coins.You got tired of remembering th...
数学
2021-04-27
0
449
洛谷P1072 [NOIP2009 提高组] Hankson 的趣味题
想了一天才打出来,真TND离谱容易发现lcm(b1,b0)=b1;所以一个想法是基于b1,用删掉一些数的方法枚举x。0.b=b1,ans=1;1.首先判断一些非法的(一定为0的)组合,直接continue;2.保留b中的因子a1,同时删去所有含a0/a1的质因子;3.判断此时lcm(b,b0)是否还...
简单数论
数学
2021-04-27
0
539
ZZUACM 2021 省赛训练 1 F-Topforces Strikes Back
One important contest will take place on the most famous programming platform (Topforces) very soon!The authors have a pool of n problems and should c...
贪心
数学
2021-04-23
0
482
ZZUACM 2021 省赛训练 1 C-Computer Game
Vova is playing a computer game. There are in total n turns in the game and Vova really wants to play all of them. The initial charge of his laptop ba...
数学
2021-04-23
0
851
ZZUACM 2021 省赛训练 1 B-Equalize Prices
There are n products in the shop. The price of the i-th product is ai. The owner of the shop wants to equalize the prices of all products. However, he...
数学
2021-04-23
0
428
Zhengzhou University programming trial of year 2021 J-汤姆和杰瑞
#include<bits/stdc++.h> using namespace std; long long absmy(long long x) { if(x<0) return -x; else return x; } int main() { ios:...
数学
2021-04-20
0
527
2021年度训练联盟热身训练赛第五场 I-Jam-packed
大致题意:有n罐果酱,每个盒子至多装k罐,盒子个数不限,现令n罐果酱装进这些盒子中,问:包含最少果酱的盒子中,最多能有多少罐果酱?1<=n,k<=10^18. 我们先令每个盒子尽可能装满,求得使用了a个满盒子,1个半满盒子;记半满盒子里有b罐果酱。则n/k=a,n%k=b.如果b=0,...
数学
2021-04-13
0
533
首页
上一页
1
2
下一页
末页