Numbers Accepts: 571 Submissions: 1212 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/262144 K (Java/Others) Problem Description There are n numbers A1,A2....An{A}_{1},{A}_{2}....{A}_{n}A1,A2....An,your task is to check whether t…
Game 问题描述 XY在玩一个游戏:有N根柱子排成一排,编号为1到N,每个柱子上面有一块宝石,现在XY站在第S根柱子上,出口在第T跟柱子上,XY需要拿到所有宝石后从出口离开.每次XY可以走到相邻的柱子上,也可以使用超能力跳到第一根柱子或者第N根柱子上,如果离开了柱子之后再也不能到达这里.为了节省能量,XY想用最少次数超能力通关. 输入描述 输入有多组数据,不超过1000组. 每组数据输入一行包含3个整数,N,S和T.(1\leq N\leq10000,1\leq S,T\leq N )(1…
Baby Ming and Weight lifting Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 681 Accepted Submission(s): 280 Problem Description Baby Ming is fond of weight lifting. He has a barbell pole(the…
tree Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 863 Accepted Submission(s): 409 Problem Description There is a tree(the tree is a connected graph which contains n points and n−1 edges),t…
HDOJ5054 Alice and Bob Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 302 Accepted Submission(s): 229 Problem Description Bob and Alice got separated in the Square, they agreed that if they…
Rikka with Phi Accepts: 5 Submissions: 66 Time Limit: 16000/8000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Problem Description Rikka and Yuta are interested in Phi function (which is known as Euler's totient function). Yuta giv…