- 博客(92)
- 资源 (1)
- 收藏
- 关注
原创 Codeforces Round #452 (Div. 2) D. Shovel Sale
D. Shovel Saletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n shovels in Polycarp's shop. The i
2017-12-17 22:15:46
321
原创 hiho 1643 最少换乘 O(n)复杂度
#1643 : 最少换乘时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Ho居住的城市有N条公交车线路,其中第i条线路上有Ki个车站。 某些线路之间会有公共的车站,小Ho可以在这些车站从一条线路换乘到另一条线路。 现在给定N条公交车线路以及两个车站S和E,你能帮助小Ho计算从S到E最少换乘几次公交车吗?
2017-11-26 20:06:04
677
原创 Educational Codeforces Round 33 893D - Credit Card
D. Credit Cardtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecenlty Luba got a credit card and started
2017-11-25 13:01:28
861
原创 Codeforces Round #447 (Div. 2) C. Marco and GCD Sequence
C. Marco and GCD Sequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn a dream Marco met an elderly ma
2017-11-20 23:44:12
376
原创 Codeforces Round #447 (Div. 2) B. Ralph And His Magic Field
B. Ralph And His Magic Fieldtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputRalph has a magic field which i
2017-11-20 19:37:46
474
原创 hiho1620 股票价格3
#1620 : 股票价格3时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi最近在关注股票,为了计算股票可能的盈利,他获取了一只股票最近N天的价格A1~AN。 小Hi想知道,对于第i天的股票价格Ai,几天之后股价会第一次超过Ai。 假设A=[69, 73, 68, 81, 82],则对于A1=
2017-11-05 17:21:50
461
原创 hiho1619 “共同富裕”
#1619 : “共同富裕”时间限制:10000ms单点时限:1000ms内存限制:256MB描述给定一个数组A1, A2, ... AN,每次操作可以从中选定一个元素Ai,把除了Ai之外的所有元素都加1。 问最少几次操作可以实现“共同富裕”,即数组中所有元素都相等。例如对于[1, 1, 1, 2, 3]经过3步:[1,
2017-11-05 16:34:17
1174
原创 Educational Codeforces Round 31 C. Bertown Subway
C. Bertown Subwaytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe construction of subway in Bertown is a
2017-10-28 00:33:03
611
原创 Kickstart Round G 2017 Problem C. Matrix Cutting
Problem C. Matrix CuttingThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read the Quick-Start
2017-10-22 21:29:48
357
原创 Kickstart Round G 2017 Problem B. Cards Game
Problem B. Cards GameThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read the Quick-Start Guid
2017-10-22 21:09:12
632
原创 Kickstart Round G 2017 Problem A. Huge Numbers
roblem A. Huge NumbersThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read the Quick-Start Gui
2017-10-22 19:32:57
507
原创 百度之星1006度度熊的01世界
度度熊的01世界 Accepts: 967 Submissions: 3064 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description度度熊是一个喜欢计算机的孩子,在计算机的世界中,所有
2017-08-12 16:57:21
312
原创 hiho1305区间求差
#1305 : 区间求差时间限制:10000ms单点时限:1000ms内存限制:256MB描述给定两个区间集合 A 和 B,其中集合 A 包含 N 个区间[ A1, A2 ], [ A3, A4 ], ..., [ A2N-1, A2N ],集合 B 包含 M 个区间[ B1, B2 ], [ B3, B4 ], ...,
2017-05-29 20:58:30
647
原创 第十五届北京师范大学程序设计竞赛决赛 D. Disdain Chain
D. Disdain ChainTime Limit: 2000msCase Time Limit: 2000msMemory Limit: 262144KB64-bit integer IO format: %lld Java class name: MainSubmit Status PID: 52503Font Size: +
2017-04-24 23:53:32
910
原创 Atcoder Alice&Brown
Problem StatementAlice and Brown loves games. Today, they will play the following game.In this game, there are two piles initially consisting of X and Y stones, respectively. Alice and Bob alter
2017-04-23 21:58:30
712
原创 hiho1515分数调查
#1515 : 分数调查时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi的学校总共有N名学生,编号1-N。学校刚刚进行了一场全校的古诗文水平测验。 学校没有公布测验的成绩,所以小Hi只能得到一些小道消息,例如X号同学的分数比Y号同学的分数高S分。 小Hi想知道利用这些消息,能不能判断出某两位同学之间
2017-04-23 21:34:27
902
原创 hiho1514偶像的条件
题目1 : 偶像的条件时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi的学校正面临着废校的大危机。面对学校的危机,小Hi同学们决定从ABC三个班中各挑出一名同学成为偶像。 成为偶像团体的条件之一,就是3名团员之间的身高差越小越好。 已知ABC三个班同学的身高分别是A1..AN, B1..BM 和
2017-04-23 21:02:21
811
原创 hiho1507 可疑的记录
描述小Hi有一棵N个节点的树,编号1-N,其中1号节点是整棵树的根。他把这棵树的N-1条边记录成N-1行,每行2个整数a和b,表示a是b的父节点。 喜欢恶作剧的小Ho在小Hi的记录里加了一行两个整数,于是小Hi不得设法找出这行可疑的记录。具体来说,如果去掉某一行之后,余下N-1行按小Hi的规则(a是b的父节点)恰好能构成一棵N个节点的树,并且满足编号恰好是1-N且1号节点是根,那么被去掉
2017-04-16 15:52:31
605
原创 hiho1487岛屿3
描述H国正在进行一项持续N周的填海造岛工程。整片工程海域可以被看作是1000x1000的网格。每周都有一块1x1的单位方格海域被填成陆地。如果我们将连成一片的陆地(一块单位方格与它上下左右4个单位方格是相连的)视为岛屿,H国想监测每周末整片海域中一共存在有多少个岛屿,以及这些岛屿的总面积和总周长各是多少。假设工程持续三周,第一周被填的海域坐标是(0, 0),那么第一周结
2017-03-26 16:40:53
714
原创 hiho1486 物品价值
描述小Hi现在有n个物品,每个物品都有一个价值。并且这n个物品总共有m个不同的属性,每个物品都具有其中若干属性。小Ho要从中选出若干物品,满足每个属性都正好有奇数个物品拥有,且被选出的物品价值总和最大。你能帮助小Ho完成任务么?输入第一行一个数T(第一行两个数n,m(1接下来每两行描述一件物品。对于每一件物品:第一行两个数v和s,表示
2017-03-26 15:57:05
1346
原创 1483 区间价值
题目3 : 区间价值时间限制:10000ms单点时限:1000ms内存限制:256MB描述给定n个数A1...An,小Ho想了解AL..AR中有多少对元素值相同。小Ho把这个数目定义为区间[L,R]的价值,用v[L,R]表示。例如1 1 1 2 2这五个数所组成的区间的价值为4。现在小Ho想知道在所有的的v[L,R](1
2017-03-20 00:12:00
1608
原创 hiho1482出勤记录II
题目2 : 出勤记录II时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi的算法课老师每次上课都会统计小Hi的出勤记录。迟到会被记录一个L,缺席会被记录一个A,按时上课会被记录一个O。一学期结束,小Hi的出勤记录可以看成是一个只包含LAO的字符串,例如"OOOOLOOOLALLO……"。如果小Hi整学期缺
2017-03-19 15:59:16
830
原创 AtCoder Go Home
C - Go HomeTime limit : 2sec / Memory limit : 256MBScore : 200 pointsProblem StatementThere is a kangaroo at coordinate 0 on an infinite number line that runs from left to right,
2017-03-18 23:23:08
1089
原创 Codeforces Round #403 (Div. 2) C. Andryusha and Colored Balloons
C. Andryusha and Colored Balloonstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndryusha goes through a
2017-03-06 00:04:55
1003
原创 Codeforces Round #403 (Div. 2) B. The Meeting Place Cannot Be Changed
B. The Meeting Place Cannot Be Changedtime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe main road in Byt
2017-03-05 23:47:50
588
原创 hiho 1469 福字
#1469 : 福字时间限制:6000ms单点时限:1000ms内存限制:256MB描述新年到了,你收到了一副画。你想找到里面最大的福字。一副画是一个n × n的矩阵,其中每个位置都是一个非负整数。一个福字被定义成是大小为 k 的正方形,满足其中的每个位置上的数都恰好比他的左边的那个和上边的那个大1(如果左边或上边的那个不存在的话
2017-02-21 13:20:04
462
原创 Codeforces Round #395 (Div. 2)D. Timofey and rectangles
D. Timofey and rectanglestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne of Timofey's birthday present
2017-02-03 14:42:02
398
原创 Codeforces Round #395 (Div. 2) C. Timofey and a tree
Each New Year Timofey and his friends cut down a tree of n vertices and bring it home. After that they paint all the n its vertices, so that the i-th vertex gets color ci.Now it's time for Timof
2017-02-03 10:45:19
358
原创 Round E APAC Test 2017 Problem B. Beautiful Numbers
ProblemWe consider a number to be beautiful if it consists only of the digit 1 repeated one or more times. Not all numbers are beautiful, but we can make any base 10 positive integer beautiful by
2017-02-02 18:19:56
774
原创 memset函数的使用原理
竞赛中经常使用memset函数进行数组初始化,但只能初始为0, -1。哪怕写成:int num[N];memset(num, 1, sizeof(num));num[0]也是个很大的数。今天看了一下C标准库里面memset函数的源码,一切就清楚了void *(memset)(void *s, int c, size_t n){ const unsigned char uc
2017-02-01 20:35:44
5291
1
原创 hihoCoder #1116 : 计算
描述现在有一个有n个元素的数组a1, a2, ..., an。记f(i, j) = ai * ai+1 * ... * aj。初始时,a1 = a2 = ... = an = 0,每次我会修改一个ai的值,你需要实时反馈给我 ∑1 f(i, j)的值 mod 10007。输入第一行包含两个数n(1接下来q行,每行包含两个数i, x,代表我把ai的值改为了
2017-01-31 20:11:43
660
原创 Facebook Hacker Cup 2017 Round 1 Pie Progress
In the ever-popular role-playing game Dungeons & Dragons, or D&D, some wizards enhance their skills by training as geometers, specialist spell-casters who rely on th
2017-01-28 18:05:51
1210
原创 Facebook Hacker Cup 2016 Qualification Round Text Editor
Facebook Hacker Cup 2016 Qualification RoundYou have a list of N distinct words, consisting of only lowercase letters. You'd like to print any K words from this list, one per page, in any or
2017-01-27 20:20:41
370
原创 Problem A. Password Attacker
Problem A. Password AttackerThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read the Quick-Start
2017-01-10 00:01:45
403
原创 Facebook Hacker Cup 2016 Round 1 Laundro, Matt
Facebook Hacker Cup 2016 Round 1注意Laundro, Matt20 pointsDownload InputChoose OutputNo output file selectedSubmitMatt Laundro i
2016-10-23 22:26:56
1083
原创 Facebook Hacker Cup 2016 Qualification Round The Price is Correct
The Price is Correct25 pointsDownload InputChoose OutputNo output file selectedSubmitYou've managed to become a contestant on the hottest new game show, T
2016-10-21 14:11:03
552
原创 Facebook Hacker Cup 2016 Qualification Round High Security
High Security25 pointsDownload InputChoose OutputNo output file selectedSubmitA top-secret algorithmic research facility has decided to up its security by
2016-10-21 12:31:18
562
原创 Educational Codeforces Round 16 C. Magic Odd Square
C. Magic Odd Squaretime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFind an n × n matrix with different numb
2016-08-25 12:48:59
347
原创 Codeforces Round #368 (Div. 2)C.Pythagorean Triples 本原勾股数组
C. Pythagorean Triplestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKatya studies in a fifth grade. Recen
2016-08-21 13:31:58
374
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人