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…
The Highest Mark 问题描述 2045年的SD省队选拔,赛制和三十年前已是完全不同.一场比赛的比赛时间有 tt 分钟,有 nn 道题目. 第 ii 道题目的初始分值为 A_i(A_i \leq 10^{6})Ai(Ai≤106) 分,之后每过一分钟这道题目的分值会减少 B_iBi 分,并且保证到比赛结束时分值不会减少为负值.比如,一个人在第 xx 分钟结束时做出了第 ii 道题目,那么他/她可以得到 A_i - B_i * xAi−Bi∗x 分.…
Codeforces Round #262 (Div. 2) 1004 D. Little Victor and Set time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Little Victor adores the sets theory. Let us remind you that a set is a group of…
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…