![](https://img-blog.csdnimg.cn/20201212113412214.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
ACM
ACM相关题目与算法
KeepTing
java开发工程师
展开
-
hdu 1500 Chopsticks(动态规划)
Problem DescriptionIn China, people use a pair of chopsticks to get food on the table, but Mr. L is a bit different. He uses a set of three chopsticks -- one pair, plus an EXTRA long chopstick to ge原创 2015-09-07 21:10:05 · 426 阅读 · 0 评论 -
hdu 1050 Moving Tables(贪心算法)
Problem DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure.The floor has 200 rooms each on the north side and原创 2015-09-28 20:39:20 · 439 阅读 · 0 评论 -
HDU 1232 畅通工程 (dfs、并查集)
Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?Input测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( 注意:两个城市之原创 2016-01-21 10:50:09 · 409 阅读 · 0 评论 -
HDU 2151 Worm (动态规划)
Problem Description自从见识了平安夜苹果的涨价后,Lele就在他家门口水平种了一排苹果树,共有N棵。突然Lele发现在左起第P棵树上(从1开始计数)有一条毛毛虫。为了看到毛毛虫变蝴蝶的过程,Lele在苹果树旁观察了很久。虽然没有看到蝴蝶,但Lele发现了一个规律:每过1分钟,毛毛虫会随机从一棵树爬到相邻的一棵树上。比如刚开始毛毛虫在第2棵树上,过1分钟后,毛毛原创 2016-02-05 20:32:20 · 381 阅读 · 0 评论 -
HDU 2545 树上战争 (并查集)
Problem Description给一棵树,如果树上的某个节点被某个人占据,则它的所有儿子都被占据,lxh和pfz初始时分别站在两个节点上,谁当前所在的点被另一个人占据,他就输了比赛,问谁能获胜Input输入包含多组数据每组第一行包含两个数N,M(N,M接下来N-1行,每行2个整数A,B(1接下来M行,每行有2个数,表示lxh和pfz的初始位置的编号X,Y(1原创 2016-02-21 11:13:58 · 365 阅读 · 0 评论 -
HDU 2512 一卡通大冒险 (集合划分)
Problem Description因为长期钻研算法, 无暇顾及个人问题,BUAA ACM/ICPC 训练小组的帅哥们大部分都是单身。某天,他们在机房商量一个绝妙的计划"一卡通大冒险"。这个计划是由wf最先提出来的,计划的内容是,把自己的联系方式写在校园一卡通的背面,然后故意将自己的卡"遗失"在某处(如水房,TD,食堂,主M。。。。)他们希望能有MM看到他们遗失卡,能主动跟他们联系,这样就有原创 2016-03-05 16:25:42 · 541 阅读 · 0 评论 -
2016中国大学生程序设计竞赛 1004 Danganronpa
Problem DescriptionChisa Yukizome works as a teacher in the school. She prepares many gifts, which consist of n kinds with a[i] quantities of each kind, for her students and wants to hold a class me原创 2016-08-14 18:05:09 · 603 阅读 · 0 评论 -
HDU 5858 Hard problem(几何)
Hard problemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 364 Accepted Submission(s): 271Problem Descriptioncjj is fun with m原创 2016-09-21 15:42:46 · 347 阅读 · 0 评论 -
HDU 5902 GCD is Funny(GCD)
GCD is FunnyTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 468 Accepted Submission(s): 125Problem DescriptionAlex has invent原创 2016-09-30 11:29:06 · 538 阅读 · 0 评论 -
POJ 2084 Game of Connections(大数+卡特兰数)
Game of ConnectionsTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 8331Accepted: 4141DescriptionThis is a small but ancient g原创 2016-11-05 20:24:27 · 662 阅读 · 2 评论 -
2016 ACM/ICPC 青岛区域赛网络赛 1005 Balanced Game (找规律)
Balanced GameTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2126 Accepted Submission(s): 1448Problem DescriptionRock-paper-sci原创 2016-09-18 09:32:41 · 1525 阅读 · 0 评论 -
2016 ACM/ICPC 青岛区域赛网络赛 1001 I Count Two Three(打表+二分)
I Count Two ThreeTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3582 Accepted Submission(s): 1094Problem DescriptionI will sho原创 2016-09-18 10:35:49 · 1481 阅读 · 0 评论 -
2013年山东省第四届ACM大学生程序设计竞赛-Alice and Bob (找规律+二进制)
题目描述Alice and Bob like playing games very much.Today, they introduce a new game.There is a polynomial like this: (a0*x^(2^0)+1) * (a1 * x^(2^1)+1)*.......*(an-1 * x^(2^(n-1))+1). Then Alice ask原创 2016-03-28 07:21:15 · 660 阅读 · 0 评论 -
2014年山东省第五届ACM--angry_birds_again_and_again
angry_birds_again_and_again Time Limit: 2000MS Memory limit: 65536K题目描述The problems ca原创 2016-04-10 15:37:47 · 668 阅读 · 0 评论 -
2014年山东省第五届ACM--Full Binary Tree (满二叉树)
Full Binary TreeTime Limit: 2000MS Memory limit: 65536K题目描述In computer science, a binary tree is a tree data structure in which each node has at most two children. Consider an infinite full原创 2016-04-10 15:58:38 · 640 阅读 · 0 评论 -
2014年山东省第五届ACM--Weighted Median
Weighted MedianTime Limit: 2000MS Memory limit: 65536K题目描述For n elements x1, x2, ..., xn with positive integer weights w1, w2, ..., wn. The weighted median is the element xk satisfying and原创 2016-04-10 16:22:00 · 458 阅读 · 0 评论 -
2015山东省第六届ACM-BIGZHUGOD and His Friends II(赛瓦定理+二分法求三次方程)
题目描述BIGZHUGOD and his three friends are playing a game in a triangle ground.The number of BIGZHUGOD is 0, and his three friends are numbered from 1 to 3. Before the game begins, three friends stan原创 2016-05-22 20:43:02 · 662 阅读 · 2 评论 -
HDU-5563 (Clarke and five-pointed star)
Problem DescriptionClarke is a patient with multiple personality disorder. One day, Clarke turned into a learner of geometric.When he did a research with polygons, he found he has to judge if th原创 2016-07-15 09:16:01 · 397 阅读 · 0 评论 -
hdu 5512 (Pagodas) 2015 ACM/ICPC 亚洲区沈阳赛区 (题目编号1004)
Problem Descriptionn pagodas were standing erect in Hong Jue Si between the Niushou Mountain and the Yuntai Mountain, labelled from 1 to n. However, only two of them (labelled a and b, where 1≤a≠b≤n原创 2015-10-31 21:32:59 · 1947 阅读 · 0 评论 -
hdu-5597 GTW likes function
Problem DescriptionNow you are given two definitions as follows.f(x)=∑xk=0(−1)k22x−2kCk2x−k+1,f0(x)=f(x),fn(x)=f(fn−1(x))(n≥1)Note that φ(n) means Euler’s totient function.(φ(n)is an arithme原创 2015-12-13 10:32:54 · 526 阅读 · 0 评论