牛客第五场 G max 思维】的更多相关文章

链接:https://www.nowcoder.com/acm/contest/143/G来源:牛客网 Give two positive integer c, n. You need to find a pair of integer (a,b) satisfy 1<=a,b<=n and the greatest common division of a and b is c.And you need to maximize the product of a and b 输入描述: The…
链接:https://www.nowcoder.com/acm/contest/143/J来源:牛客网 There are n students going to travel. And hotel has two types room:double room and triple room. The price of a double room is p2 and the price of a triple room is p3 Now you need to calulate the min…
链接:https://www.nowcoder.com/acm/contest/143/A来源:牛客网 Kanade selected n courses in the university. The academic credit of the i-th course is s[i] and the score of the i-th course is c[i]. At the university where she attended, the final score of her is …
目录 题意: 分析: @(2019牛客暑期多校训练营(第八场)E_Explorer) 题意: 链接 题目类似:CF366D,Gym101652T 本题给你\(n(100000)\)个点\(m(10000)\)条边,每无向边允许通过编号在\([Li,Ri](1\le Li\le Ri\le 1e9)\)内的人,问从\(1\)到\(n\)能通过多少个人. 分析: 赛中艹了30多发暴力无济于事... 因为以前做过一道数据范围1000的原题,当时做法好像是离散化后枚举区间暴力跑\(dfs\)查询或者带着…
链接:https://www.nowcoder.com/acm/contest/140/J 来源:牛客网 White Rabbit has a rectangular farmland of n*m. In each of the grid there is a kind of plant. The plant in the j-th column of the i-th row belongs the a[i][j]-th type. White Cloud wants to help Whi…
链接:https://ac.nowcoder.com/acm/contest/634/B 来源:牛客网 给出n条线段,第i条线段的长度为ai, 每次可以从第i条线段的j位置跳到第i + 1条线段的j+1位置. 如果第i+1条线段长度不到j+,那么就会回到第i条线段的0位置,然后继续跳. 问从第i条线段的0位置跳到第n条线段需要跳多少次 为了减少输入量,a数组将由以下方式得到 unsigned int SA, SB, SC; int mod; unsigned int Rand(){ SA ^=…
链接:https://www.nowcoder.com/acm/contest/205/G来源:牛客网 题目描述 终于活成了自己讨厌的样子. 充钱能让你变得更强. 在暖婊这个游戏里面,如果你充了x元钱,那么你能获得10x个钻石.同时暖婊也有m档VIP,如果你往暖婊里面充了ai个钻石,那么你能成为第i档贵族用户.当你成为第i档贵族用户之后,那么你可以获得的优惠. 你需要k件材料合成衣服,其中第i件材料原价为di个钻石,你一共需要ci件这种材料.当你获得p的优惠时,这个材料的真实价格为. 请问栗子米…
链接:https://www.nowcoder.com/acm/contest/86/G来源:牛客网 题目描述 Sεlιнα(Selina) 开始了新一轮的男友海选.她要求她的男友要德智体美劳样样都全.首先进行的是文化知识竞赛. Sεlιнα 精心准备了一套选择题,每个选择题有且只有一个正确答案.她邀请参赛男友们来答题,并回收了试卷准备批改.可是她却犯了愁.她不知道怎么快速地批改完这些试卷.她知道你是计算机大佬,就跑来请你写个程序帮她批改试卷. Sεlιнα 会给你一份标准答案,再给你每个参赛男…
链接:https://www.nowcoder.com/acm/contest/136/G来源:牛客网 题目描述     HA实验有一套非常严密的安全保障体系,在HA实验基地的大门,有一个指纹锁.     该指纹锁的加密算法会把一个指纹转化为一个不超过1e7的数字,两个指纹数值之差越小,就说明两个指纹越相似,当两个指纹的数值差≤k时,这两个指纹的持有者会被系统判定为同一个人.     现在有3种操作,共m个, 操作1:add x,表示为指纹锁录入一个指纹,该指纹对应的数字为x,如果系统内有一个与…
链接:https://www.nowcoder.com/acm/contest/136/E来源:牛客网 题目描述 善弈者谋势,不善弈者谋子.                                         ——<弈林新编> 蒟蒻HtBest与神犇WHZ下棋(五子棋),HtBest执黑棋,WHZ执白棋.由于HtBest天资愚笨,不会判断输赢,所以需要你帮他开发一个判断五子棋输赢的程序. 输入描述: 第一行有2个正整数n,m,分别表示棋盘大小(n*n)和对弈步数.接下来m行,每行两…