链接: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 …
链接: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 ^=…