随笔分类 -  水题

摘要:In a list of songs, the i-th song has a duration of time[i] seconds. Return the number of pairs of songs for which their total duration in seconds is 阅读全文
posted @ 2019-03-17 23:22 樱花落舞 阅读(343) 评论(0) 推荐(0) 编辑
摘要:Every non-negative integer N has a binary representation. For example, 5 can be represented as "101" in binary, 11 as "1011" in binary, and so on. Not 阅读全文
posted @ 2019-03-17 23:13 樱花落舞 阅读(209) 评论(0) 推荐(0) 编辑
摘要:链接:https://www.nowcoder.com/acm/contest/115/D来源:牛客网 题目描述 事情,是这样的。 有这么一天双休日的中午。 我刚把我衣服扔进了洗衣机,然后拿了个小板凳坐在旁边发呆。 然后突然想到这么无聊干脆玩会阴阳师好了,于是从斗篷帽子里掏出我的手机登录了阴阳师。 阅读全文
posted @ 2018-04-21 22:43 樱花落舞 阅读(210) 评论(0) 推荐(0) 编辑
摘要:链接:https://www.nowcoder.com/acm/contest/115/C来源:牛客网 题目描述 决赛圈还剩下两个人,“伏地魔”XDD和跑毒进圈的FZL,XDD拿着狙击枪AWM瞄准并准备射击奔跑中的FZL。 XDD知道自己只有这一次机会,如果失误了,他就会被大哥FZL空中360度甩狙 阅读全文
posted @ 2018-04-21 22:41 樱花落舞 阅读(339) 评论(0) 推荐(0) 编辑
摘要:链接:https://www.nowcoder.com/acm/contest/115/B来源:牛客网 题目描述 给出一个出生日期,比如:1999-09-09, 问:从出生那一天开始起,到今天2018-04-21为止(包括出生日期和今天),有多少天,年月日都不包含数字4? 输入描述: 第一行输入一个 阅读全文
posted @ 2018-04-21 22:39 樱花落舞 阅读(303) 评论(0) 推荐(0) 编辑
摘要:链接:https://www.nowcoder.com/acm/contest/115/A来源:牛客网 题目描述 "挤需体验五番钟,里造会挨上这款游戏!" 怎么可能嘛!当我是傻子吗!#?%!“”@…… 于是我就去玩了,然后我果然成功证明,我是正确的,这破游戏,真的很无聊. 有多无聊呢,和这道题一样. 阅读全文
posted @ 2018-04-21 22:38 樱花落舞 阅读(334) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文
posted @ 2018-03-01 00:25 樱花落舞 阅读(133) 评论(0) 推荐(0) 编辑
摘要:Problem Description 最近流行吃鸡,那就直接输出一行"Winner winner ,chicken dinner!"(没有双引号)模板代码:#include <stdio.h>int main(){printf("hello world\n");return 0;} Input 没 阅读全文
posted @ 2017-11-18 18:16 樱花落舞 阅读(408) 评论(0) 推荐(0) 编辑
摘要:Petya is a big fan of mathematics, especially its part related to fractions. Recently he learned that a fraction is called proper iff its numerator is 阅读全文
posted @ 2017-09-07 11:54 樱花落舞 阅读(309) 评论(0) 推荐(0) 编辑
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1854 随手练习 阅读全文
posted @ 2017-09-06 18:45 樱花落舞 阅读(185) 评论(0) 推荐(0) 编辑
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2523 随手练习 阅读全文
posted @ 2017-09-06 18:43 樱花落舞 阅读(149) 评论(0) 推荐(0) 编辑
摘要:A B Problem Statement You are given an integer sequence of length N, a1,a2,…,aN. For each 1≤i≤N, you have three choices: add 1 to ai, subtract 1 from  阅读全文
posted @ 2017-09-02 23:36 樱花落舞 阅读(1167) 评论(0) 推荐(0) 编辑
摘要:Where do odds begin, and where do they end? Where does hope emerge, and will they ever break? Given an integer sequence a1, a2, ..., an of length n. D 阅读全文
posted @ 2017-09-02 18:07 樱花落舞 阅读(206) 评论(0) 推荐(0) 编辑
摘要:Description forever97和pikapikachu在玩一种画图游戏,两人相互往一个n*m大的矩形里画半径为r的圆,任意两圆不能相交,圆与矩形也不能相交,不能再画的人输。现在forever97先画,假设两人都足够聪明,均采取最佳策略,问最后谁会赢? Input 第一行一个正整数T(T< 阅读全文
posted @ 2017-08-14 18:03 樱花落舞 阅读(323) 评论(0) 推荐(0) 编辑
摘要:Description 女神YSJ给Martin发了一个视频。“猜猜里面哪个是我。” 女神说。作为一个脸盲,再加上多年不见,Martin已经完全不知道女神长成了什么样子,他表示完全认不出来。好在Martin手上还有一张YSJ小时候的照片,他可以拿照片和视频里的人进行特征比对,从而找出女神。为了简化问 阅读全文
posted @ 2017-08-14 18:02 樱花落舞 阅读(180) 评论(0) 推荐(0) 编辑
摘要:Description 小马哥是个追求完美的人,现在给定一个正整数数列,和正整数p,设这个数列中的最大值是M,最小值是m,如果M <= m * p,则称这个数列是完美的,现在给定参数p和一些正整数,请你从中选择尽可能多的数构成一个完美数列。 小马哥是个追求完美的人,现在给定一个正整数数列,和正整数p 阅读全文
posted @ 2017-08-14 18:02 樱花落舞 阅读(246) 评论(0) 推荐(0) 编辑
摘要:Vasily has a number a, which he wants to turn into a number b. For this purpose, he can do two types of operations: multiply the current number by 2 ( 阅读全文
posted @ 2017-07-26 22:44 樱花落舞 阅读(263) 评论(0) 推荐(0) 编辑
摘要:While Mahmoud and Ehab were practicing for IOI, they found a problem which name was Longest common subsequence. They solved it, and then Ehab challeng 阅读全文
posted @ 2017-07-26 01:11 樱花落舞 阅读(183) 评论(0) 推荐(0) 编辑
摘要:Sherlock has a new girlfriend (so unlike him!). Valentine's day is coming and he wants to gift her some jewelry. He bought n pieces of jewelry. The i- 阅读全文
posted @ 2017-07-23 00:17 樱花落舞 阅读(263) 评论(0) 推荐(0) 编辑
摘要:Our beloved detective, Sherlock is currently trying to catch a serial killer who kills a person each day. Using his powers of deduction, he came to kn 阅读全文
posted @ 2017-07-23 00:12 樱花落舞 阅读(261) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示