acm
catTom
这个作者很懒,什么都没留下…
展开
-
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 · 305 阅读 · 0 评论 -
hiho1486 物品价值
描述小Hi现在有n个物品,每个物品都有一个价值。并且这n个物品总共有m个不同的属性,每个物品都具有其中若干属性。小Ho要从中选出若干物品,满足每个属性都正好有奇数个物品拥有,且被选出的物品价值总和最大。你能帮助小Ho完成任务么?输入第一行一个数T(第一行两个数n,m(1接下来每两行描述一件物品。对于每一件物品:第一行两个数v和s,表示原创 2017-03-26 15:57:05 · 1333 阅读 · 0 评论 -
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 · 1589 阅读 · 0 评论 -
hiho1482出勤记录II
题目2 : 出勤记录II时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi的算法课老师每次上课都会统计小Hi的出勤记录。迟到会被记录一个L,缺席会被记录一个A,按时上课会被记录一个O。一学期结束,小Hi的出勤记录可以看成是一个只包含LAO的字符串,例如"OOOOLOOOLALLO……"。如果小Hi整学期缺原创 2017-03-19 15:59:16 · 819 阅读 · 0 评论 -
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 · 993 阅读 · 0 评论 -
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 · 577 阅读 · 0 评论 -
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 · 1070 阅读 · 0 评论 -
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 · 390 阅读 · 0 评论 -
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 · 347 阅读 · 0 评论 -
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 · 740 阅读 · 0 评论 -
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 · 5227 阅读 · 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 · 646 阅读 · 0 评论 -
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 · 1195 阅读 · 0 评论 -
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 · 360 阅读 · 0 评论 -
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 · 395 阅读 · 0 评论 -
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 · 1071 阅读 · 0 评论 -
hiho1487岛屿3
描述H国正在进行一项持续N周的填海造岛工程。整片工程海域可以被看作是1000x1000的网格。每周都有一块1x1的单位方格海域被填成陆地。如果我们将连成一片的陆地(一块单位方格与它上下左右4个单位方格是相连的)视为岛屿,H国想监测每周末整片海域中一共存在有多少个岛屿,以及这些岛屿的总面积和总周长各是多少。假设工程持续三周,第一周被填的海域坐标是(0, 0),那么第一周结原创 2017-03-26 16:40:53 · 704 阅读 · 0 评论 -
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 · 592 阅读 · 0 评论 -
hiho1514偶像的条件
题目1 : 偶像的条件时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi的学校正面临着废校的大危机。面对学校的危机,小Hi同学们决定从ABC三个班中各挑出一名同学成为偶像。 成为偶像团体的条件之一,就是3名团员之间的身高差越小越好。 已知ABC三个班同学的身高分别是A1..AN, B1..BM 和原创 2017-04-23 21:02:21 · 800 阅读 · 0 评论 -
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 · 645 阅读 · 0 评论 -
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 · 840 阅读 · 0 评论 -
hiho1619 “共同富裕”
#1619 : “共同富裕”时间限制:10000ms单点时限:1000ms内存限制:256MB描述给定一个数组A1, A2, ... AN,每次操作可以从中选定一个元素Ai,把除了Ai之外的所有元素都加1。 问最少几次操作可以实现“共同富裕”,即数组中所有元素都相等。例如对于[1, 1, 1, 2, 3]经过3步:[1,原创 2017-11-05 16:34:17 · 1164 阅读 · 0 评论 -
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 · 441 阅读 · 0 评论 -
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 · 370 阅读 · 0 评论 -
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 · 450 阅读 · 0 评论 -
第十五届北京师范大学程序设计竞赛决赛 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 · 886 阅读 · 0 评论 -
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 · 345 阅读 · 0 评论 -
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 · 602 阅读 · 0 评论 -
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 · 495 阅读 · 0 评论 -
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 · 593 阅读 · 0 评论 -
百度之星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 · 305 阅读 · 0 评论 -
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 · 624 阅读 · 0 评论 -
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 · 696 阅读 · 0 评论 -
hiho1515分数调查
#1515 : 分数调查时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi的学校总共有N名学生,编号1-N。学校刚刚进行了一场全校的古诗文水平测验。 学校没有公布测验的成绩,所以小Hi只能得到一些小道消息,例如X号同学的分数比Y号同学的分数高S分。 小Hi想知道利用这些消息,能不能判断出某两位同学之间原创 2017-04-23 21:34:27 · 896 阅读 · 0 评论 -
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 · 541 阅读 · 0 评论 -
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 · 552 阅读 · 0 评论 -
Topcoder客户端下载地址
因为这个客户端经常更新,之前的老是登陆不了,所以,记录一下。http://community.topcoder.com/tc?module=Static&d1=applet&d2=partial-support原创 2013-12-14 23:29:05 · 4420 阅读 · 0 评论 -
Codeforces Beta Round #12 (Div 2 Only)D Ball(树状数组的新应用)
D. Balltime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputN ladies attend the ball in the King's palace. Ever原创 2013-07-01 08:23:08 · 1124 阅读 · 0 评论 -
poj1001 + 高精度的心得
JapanTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16970 Accepted: 4552DescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of roads原创 2013-06-30 23:58:36 · 718 阅读 · 0 评论 -
广东省赛总结
GDCPC2013,第一次参加省赛。恩还是自费的。得益于队友强大,拿了个铜。从试机开始说起,三个人被志愿者领着饶了个大圈去院楼。其实当时挺紧张的,不知怎么得聊到了楼天成的比赛风格,一人读题,一人扇风,楼教主一人虐全场。我们笑了笑算是不太紧张了。院楼正门是那样的,也是才知道,以前以为那个是后门的。不让走电梯,必须爬楼梯。我们分析一个是人太多,另一个吗,院楼楼梯不安全,我们曾经被困过。说下试机原创 2013-05-15 13:45:02 · 900 阅读 · 0 评论