01 2019 档案

摘要:标题:分糖果 有n个小朋友围坐成一圈。老师给每个小朋友随机发偶数个糖果,然后进行下面的游戏: 每个小朋友都把自己的糖果分一半给左手边的孩子。 一轮分糖后,拥有奇数颗糖的孩子由老师补给1个糖果,从而变成偶数。 反复进行这个游戏,直到所有小朋友的糖... 阅读全文
posted @ 2019-01-31 22:25 black_hole6 阅读(228) 评论(0) 推荐(0) 编辑
摘要:标题:猜字母 把abcd...s共19个字母组成的序列重复拼接106次,得到长度为2014的串。 接下来删除第1个字母(即开头的字母a),以及第3个,第5个等所有奇数位置的字母。 得到的新串再进行删除奇数位置字母的动作。如此下去,最后只剩下一个字母,... 阅读全文
posted @ 2019-01-31 22:23 black_hole6 阅读(170) 评论(0) 推荐(0) 编辑
摘要:链接:https://ac.nowcoder.com/acm/contest/330/F来源:牛客网 时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述Applese ... 阅读全文
posted @ 2019-01-30 13:46 black_hole6 阅读(201) 评论(0) 推荐(0) 编辑
摘要:链接:https://ac.nowcoder.com/acm/contest/330/G来源:牛客网 时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述众所周知,App... 阅读全文
posted @ 2019-01-29 20:16 black_hole6 阅读(204) 评论(0) 推荐(0) 编辑
摘要:链接:https://ac.nowcoder.com/acm/contest/330/E来源:牛客网 题目描述精通程序设计的 Applese 叕写了一个游戏。在这个游戏中,有一个 n 行 m 列的方阵。现在它要为这个方阵涂上黑白两种颜色。规定左右相邻两格的颜色不能相同... 阅读全文
posted @ 2019-01-29 18:14 black_hole6 阅读(319) 评论(0) 推荐(0) 编辑
摘要:链接:https://ac.nowcoder.com/acm/contest/330/E来源:牛客网 题目描述精通程序设计的 Applese 叕写了一个游戏。在这个游戏中,有一个 n 行 m 列的方阵。现在它要为这个方阵涂上黑白两种颜色。规定左右相邻两格的颜色不能相同... 阅读全文
posted @ 2019-01-29 18:07 black_hole6 阅读(140) 评论(0) 推荐(0) 编辑
摘要:Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 #include#include#includeusing namespace s... 阅读全文
posted @ 2019-01-27 22:15 black_hole6 阅读(123) 评论(0) 推荐(0) 编辑
摘要:The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo g... 阅读全文
posted @ 2019-01-27 21:29 black_hole6 阅读(203) 评论(0) 推荐(0) 编辑
摘要:链接:https://ac.nowcoder.com/acm/contest/329/I来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述处女座放完了"高... 阅读全文
posted @ 2019-01-26 17:54 black_hole6 阅读(230) 评论(0) 推荐(0) 编辑
摘要:链接:https://ac.nowcoder.com/acm/contest/329/G来源:牛客网 题目描述经过了选号和漫长的等待,处女座终于拿到了给小姐姐定制的手环,小姐姐看到以后直呼666!处女座其实也挺喜欢6这个数字的,实际上他做手环的时候选取的k=6。所以他... 阅读全文
posted @ 2019-01-26 17:52 black_hole6 阅读(219) 评论(0) 推荐(0) 编辑
摘要:题目描述处女座靠着自己的家教本领赚够了去比赛的钱,于是开启了疯狂训练。在每个夜深人静第二天不收作业的夜晚,他都会开始刷题。"今日又是一个刷题的夜晚。"他挑选了n道题开始刷,而题太多,刷不掉,理还乱(呜呜)、自己没有解决的题目每分钟都会给他带来bibi的疲倦值,而解决... 阅读全文
posted @ 2019-01-26 17:49 black_hole6 阅读(292) 评论(0) 推荐(0) 编辑
摘要:Description 一个1-n1−n的排列满足所有相邻数字奇偶性不同,那么称该排列为奇偶交错排列。按字典序输出1-n1−n的所有奇偶交错排列。Input 输入一个整数n( 2 \le n \le 11)n(2≤n≤11)Output 输出若干行,每行一个排列。相邻... 阅读全文
posted @ 2019-01-25 21:36 black_hole6 阅读(486) 评论(0) 推荐(0) 编辑
摘要:Description 有一环形地铁,一共有nn站,编号1-n1−n。正向行驶地铁会按照1->2->3->⋯->n->1的方向行驶反向则按照1->n->⋯->3->2->1的方向行驶。给定相邻两站之间的地铁行驶时间(正向、反向时间相同),现在有mm组询问,每次询问从第... 阅读全文
posted @ 2019-01-25 21:32 black_hole6 阅读(298) 评论(0) 推荐(0) 编辑
摘要:You are given n k-digit integers. You have to rearrange the digits in the integers so that the difference between the largest and the ... 阅读全文
posted @ 2019-01-25 18:30 black_hole6 阅读(261) 评论(0) 推荐(0) 编辑
摘要:链接:https://ac.nowcoder.com/acm/contest/327/H来源:牛客网 题目描述处女座进行了一场c语言的考试,要求很简单,输出2000个正整数,并且满足以下条件:1. 任意两个数互质2. 任意两个数x,y,满足,其中为... 阅读全文
posted @ 2019-01-25 12:03 black_hole6 阅读(186) 评论(0) 推荐(0) 编辑
摘要:You have a garland consisting of nn lamps. Each lamp is colored red, green or blue. The color of the ii-th lamp is sisi ('R', 'G' and ... 阅读全文
posted @ 2019-01-24 11:59 black_hole6 阅读(208) 评论(0) 推荐(0) 编辑
摘要:You have a garland consisting of nn lamps. Each lamp is colored red, green or blue. The color of the ii-th lamp is sisi ('R', 'G' and ... 阅读全文
posted @ 2019-01-24 11:56 black_hole6 阅读(199) 评论(0) 推荐(0) 编辑
摘要:Recently you have received two positive integer numbers xx and yy. You forgot them, but you remembered a shuffled list containing all ... 阅读全文
posted @ 2019-01-24 11:53 black_hole6 阅读(239) 评论(0) 推荐(0) 编辑
摘要:outputstandard outputYou are given two segments [l1;r1][l1;r1] and [l2;r2][l2;r2] on the xx-axis. It is guaranteed that l1#include#inc... 阅读全文
posted @ 2019-01-24 11:49 black_hole6 阅读(283) 评论(0) 推荐(0) 编辑
摘要:You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequen... 阅读全文
posted @ 2019-01-23 13:06 black_hole6 阅读(208) 评论(0) 推荐(0) 编辑
摘要:Two people are playing a game with a string ss, consisting of lowercase latin letters.On a player's turn, he should choose two consecu... 阅读全文
posted @ 2019-01-23 13:00 black_hole6 阅读(349) 评论(0) 推荐(0) 编辑
摘要:链接:https://ac.nowcoder.com/acm/contest/317/D来源:牛客网 题目描述小a和小b来到了一条布满了黄金的街道上。它们想要带几块黄金回去,然而这里的城管担心他们拿走的太多,于是要求小a和小b通过做一个游戏来决定最后得到的黄金的数量。... 阅读全文
posted @ 2019-01-22 20:35 black_hole6 阅读(157) 评论(0) 推荐(0) 编辑
摘要:100 可以表示为带分数的形式:100 = 3 + 69258 / 714 还可以表示为:100 = 82 + 3546 / 197 注意特征:带分数中,数字1~9分别出现且只出现一次(不包含0)。 类似这样的带分数,100 有 11 种表示... 阅读全文
posted @ 2019-01-22 13:35 black_hole6 阅读(448) 评论(0) 推荐(0) 编辑
摘要:#include#include#include#includeusing namespace std;int main(){ int n,m; scanf("%d/%d",&n,&m); int cnt=0; printf("0."); while(n) { p... 阅读全文
posted @ 2019-01-22 13:22 black_hole6 阅读(358) 评论(0) 推荐(0) 编辑
摘要:Given a string ss of length nn and integer kk (1≤k≤n1≤k≤n). The string ss has a level xx, if xx is largest non-negative integer, such ... 阅读全文
posted @ 2019-01-21 10:43 black_hole6 阅读(285) 评论(0) 推荐(0) 编辑
摘要:Salem gave you nn sticks with integer positive lengths a1,a2,…,ana1,a2,…,an.For every stick, you can change its length to any other po... 阅读全文
posted @ 2019-01-21 10:40 black_hole6 阅读(172) 评论(0) 推荐(0) 编辑
摘要:Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N! InputOne N in one line, process to the end of file. OutputFor each N, ... 阅读全文
posted @ 2019-01-20 22:29 black_hole6 阅读(165) 评论(0) 推荐(0) 编辑
摘要:There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2). InputInput consists of a sequence of ... 阅读全文
posted @ 2019-01-20 14:03 black_hole6 阅读(135) 评论(0) 推荐(0) 编辑
摘要:In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of da... 阅读全文
posted @ 2019-01-20 13:44 black_hole6 阅读(205) 评论(0) 推荐(0) 编辑
摘要:The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then th... 阅读全文
posted @ 2019-01-20 13:22 black_hole6 阅读(229) 评论(0) 推荐(0) 编辑
摘要:Dreamoon is standing at the position 0 on a number line. Drazil is sending a list of commands through Wi-Fi to Dreamoon's smartphone a... 阅读全文
posted @ 2019-01-19 17:02 black_hole6 阅读(326) 评论(0) 推荐(0) 编辑
摘要:Little Sub is about to take a math exam at school. As he is very confident, he believes there is no need for a review.Little Sub's fat... 阅读全文
posted @ 2019-01-19 15:41 black_hole6 阅读(261) 评论(0) 推荐(0) 编辑
摘要:Andrew often reads articles in his favorite magazine 2Char. The main feature of these articles is that each of them uses at most two d... 阅读全文
posted @ 2019-01-19 12:14 black_hole6 阅读(148) 评论(0) 推荐(0) 编辑
摘要:Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 10... 阅读全文
posted @ 2019-01-19 11:22 black_hole6 阅读(130) 评论(0) 推荐(0) 编辑
摘要:Vova promised himself that he would never play computer games... But recently Firestorm — a well-known game developing company — publi... 阅读全文
posted @ 2019-01-18 13:56 black_hole6 阅读(265) 评论(0) 推荐(0) 编辑
摘要:A company has n employees numbered from 1 to n. Each employee either has no immediate manager or exactly one immediate manager, who is... 阅读全文
posted @ 2019-01-18 11:48 black_hole6 阅读(244) 评论(0) 推荐(0) 编辑
摘要:An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap comput... 阅读全文
posted @ 2019-01-18 10:55 black_hole6 阅读(111) 评论(0) 推荐(0) 编辑
摘要:NN is an experienced internet user and that means he spends a lot of time on the social media. Once he found the following image on th... 阅读全文
posted @ 2019-01-14 23:11 black_hole6 阅读(179) 评论(0) 推荐(0) 编辑
摘要:Arkady coordinates rounds on some not really famous competitive programming platform. Each round features nn problems of distinct diff... 阅读全文
posted @ 2019-01-14 23:07 black_hole6 阅读(188) 评论(0) 推荐(0) 编辑
摘要:This morning, Roman woke up and opened the browser with nn opened tabs numbered from 11 to nn. There are two kinds of tabs: those with... 阅读全文
posted @ 2019-01-14 23:04 black_hole6 阅读(181) 评论(0) 推荐(0) 编辑
摘要:在一个排列中,如果一对数的前后位置与大小顺序相反,即前面的数大于后面的数,那么它们就称为一个逆序。一个排列中逆序的总数就称为这个排列的逆序数。如2 4 3 1中,2 1,4 3,4 1,3 1是逆序,逆序数是4。给出一个整数序列,求该序列的逆序数。Input第1行:N... 阅读全文
posted @ 2019-01-10 22:10 black_hole6 阅读(223) 评论(0) 推荐(0) 编辑
摘要:The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d )... 阅读全文
posted @ 2019-01-10 17:21 black_hole6 阅读(203) 评论(0) 推荐(0) 编辑
摘要:Description 某天GZS漫步在学校新建的小公园,他发现那里建成了一些水池和小河道。我们暂且把它们统一看成水池。假设公园旁有一张小公园的地图,上面仅标识了此处是否是水池,你能帮GZS计算出该地图中一共有几个水池吗。Input第一行输入一个整数N,表示共有N组测... 阅读全文
posted @ 2019-01-09 20:15 black_hole6 阅读(151) 评论(0) 推荐(0) 编辑
摘要:时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述IG won the S championship and many people are excited, ii ... 阅读全文
posted @ 2019-01-06 22:21 black_hole6 阅读(245) 评论(0) 推荐(0) 编辑
摘要:时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题目描述Sleeping is a favorite of little bearBaby, because the wet... 阅读全文
posted @ 2019-01-06 22:18 black_hole6 阅读(201) 评论(0) 推荐(0) 编辑
摘要:C:思路:做几组数据就基本能发现规律,奇数为-1,偶数为1代码:#include#include#include#includeusing namespace std;int main(){ long long int a; scanf("%lld",&a); if(... 阅读全文
posted @ 2019-01-06 14:31 black_hole6 阅读(172) 评论(0) 推荐(0) 编辑
摘要:Description GZS has two strings s and t.In each step, GZS can select arbitrary character c of s and insert any character d (d ≠ c) jus... 阅读全文
posted @ 2019-01-06 10:21 black_hole6 阅读(135) 评论(0) 推荐(0) 编辑
摘要:A.Rabbit的字符串时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述Rabbit得到了一个字符串,她的好朋友xxx可以给这个字符串施加一次魔法。魔法可以选择字符串的任... 阅读全文
posted @ 2019-01-04 23:07 black_hole6 阅读(349) 评论(0) 推荐(0) 编辑
摘要:Description 自从GZS成为G神之后,追随者不计其数,更是有了大名鼎鼎的拜神论:"吾尝终日编程也,不如须臾之拜拜G神也;吾尝打字刷题也,不如一日三拜G神也;拜拜G神,程序非长也,而出结果;三拜G神,打字非快也,而能AC。吾日三拜G神也!!!“作为菜鸟,经常遇... 阅读全文
posted @ 2019-01-03 19:02 black_hole6 阅读(192) 评论(0) 推荐(0) 编辑
摘要:对于csdn的广告大家想必......又没钱充VIP,怎么办,下面是脚本源码:重要的事说三遍:如有侵权,立即删除!如有侵权,立即删除!如有侵权,立即删除!// ==UserScript==// @name CSDN自动展开+去广告+净化剪贴板+免登陆/... 阅读全文
posted @ 2019-01-03 11:44 black_hole6 阅读(476) 评论(0) 推荐(0) 编辑
摘要:题目链接https://qduoj.com/contest/28/problems,密码:qdu1230E题:思路:先进行排序,然后去暴力模拟就可以,但可能WA了几次,导致此题没解出来,有点可惜代码:#include#include#include#includeus... 阅读全文
posted @ 2019-01-02 17:39 black_hole6 阅读(152) 评论(0) 推荐(0) 编辑

欢迎阅读『2019 年 1月 随笔档案』
点击右上角即可分享
微信分享提示