牛客网挑战赛
axiaobingqiu
这个作者很懒,什么都没留下…
展开
-
Wannafly挑战赛15B题题解
#include<iostream>#include<cstdio>#include<algorithm>#include<cstring>#include<cmath>using namespace std;const int maxn=1e5+10;int n;int a[maxn];int main(){ s...原创 2018-05-11 21:36:41 · 288 阅读 · 0 评论 -
dfs求解L31A
题目是这样的:链接:https://ac.nowcoder.com/acm/contest/218/A来源:牛客网 现在,你作为一名新星鹏洛客,找到了一块绝佳的修炼地。这块地方可以被描述成一个 n x m 的矩形。你已经在这块地中的一些位置打好了标记。接下去,就该对整块地赋予你的颜色了。一个位置能被赋予你的颜色,当且仅当满足以下条件之一: 1. 这个位置被打上了标记。 ...原创 2018-11-17 10:35:00 · 191 阅读 · 0 评论 -
牛客网Wannafly挑战赛27部分题解
number1:求完全平方数的个数“White shores, and beyond. A far green country under a swift sunrise.”--灰魔法师给出长度为n的序列a, 求有多少对数对 (i, j) (1 <= i < j <= n) 满足 ai + aj 为完全平方数。这个题暴力求肯定会超时。知道数字的取值范围就知道最大平方数是...原创 2018-10-27 21:02:45 · 269 阅读 · 0 评论 -
codeforces-918字符串'(' '('处理
题面:As Will is stuck in the Upside Down, he can still communicate with his mom, Joyce, through the Christmas lights (he can turn them on and off with his mind). He can't directly tell his mom wher...原创 2018-08-02 19:46:45 · 251 阅读 · 0 评论 -
牛客网多校赛第五场 J题
链接: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 o...原创 2018-08-02 19:18:11 · 181 阅读 · 0 评论 -
一个与公约数的变形 牛客网多校联赛第五场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输入描述:...原创 2018-08-02 16:49:22 · 194 阅读 · 0 评论 -
最大化平均值 牛客网多校联赛第五场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 ...原创 2018-08-02 16:44:45 · 139 阅读 · 0 评论 -
牛客网练习赛24 E青蛙
题面:链接:https://www.nowcoder.com/acm/contest/157/E来源:牛客网 有一只可爱的老青蛙,在路的另一端发现了一个黑的东西,想过去一探究竟。于是便开始踏上了旅途一直这个小路上有很多的隧道,从隧道的a进入,会从b出来,但是隧道不可以反向走。这只青蛙因为太老了,所以很懒,现在想请你帮帮慢,问他最少需要几步才可以到达对面。将小径看作一条数轴,青蛙...原创 2018-08-11 09:59:30 · 255 阅读 · 0 评论 -
牛客网挑战赛21 A灯塔
链接:https://www.nowcoder.com/acm/contest/159/A来源:牛客网 Z市是一座港口城市,来来往往的船只依靠灯塔指引方向。在海平面上,存在n个灯塔。每个灯塔可以照亮以它的中心点为中心的90°范围。特別地, 由于特殊限制,每个灯塔照亮范围的角的两条边必须要么与坐标轴平行要么与坐标轴成45°。 由于经费限制,Z市的灯塔只能被点亮一座。你需要求出在这种情况下,...原创 2018-08-03 21:12:56 · 375 阅读 · 0 评论 -
牛客网挑战赛29A题
链接:https://ac.nowcoder.com/acm/contest/271/A来源:牛客网misaka是呱太爷爷的小粉丝,呱太爷爷有一句话说的好:"一尺之棰,日取其半,万世不竭"。misaka现在有 n 个呱太玩偶放在一堆,每一次操作,misaka会选择当前个数 > 1 的一堆呱太玩偶。并将这一堆呱太玩偶分成 和 两堆,x 是当前这一堆玩偶的个数。现在 misaka 想将玩...原创 2018-11-24 11:17:44 · 342 阅读 · 0 评论