4 xtulollipop



TA的排名 2w+


数组排序Arrays.sort(int[] x,int fromIndex,int fromIndex)fromIndex到fromIndex-1的数组进行排序自定义类排序1.comparator,重写排序方法的办法package lx;import java.util.Arrays;import java.util.Comparator;class point{ int x,y;

2017-02-17 21:49:19

codeforces Good Bye 2016

A. New Year and Hurry time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output

2016-12-31 16:38:32

hdu5973Game of Taking Stones+威佐夫博弈+高精度

Description Two people face two piles of stones and make a game. They take turns to take stones. As game rules, there are two different methods of taking stones: One scheme is that you can take any nu

2016-11-21 17:28:48


Robot 题目描述 机器人一开始站在原点,可以上下左右(分别用“UDLR”表示)移动,每次移动一步。Estrella想知道对于某个指令序列,如果把一种指令全部替换成另一种指令,新的指令序列是否可以让机器人回到原点。 输入 存在多个样例,每个样例一行,为一条指令序列,长度不超过200。 输出 每行输出一个样例的结果,可以输出“Yes”,否则输出“No”。 样例输入 LD LLDDD

2016-11-01 21:07:54


Description “超人”霍华德在NBA扣篮大赛上要求把篮筐升高表演扣篮,但是却没有得到批准,现在我们的hhb也想要给大家表演一个,但是这次他想要表演的是投篮,篮筐放得越高,hhb的表演当然就越精彩,所以现在请你帮助hhb计算出篮筐离地最高能放多高。 假设把球投到篮框的高度就算球进。忽略球和框的大小。Input 多组测试数据 每组测试数据包括3个浮点数h, l, v (1<=h<=

2016-10-15 20:55:48

hdu1071The area+数学积分

gnatius bought a land last week, but he didn’t know the area of the land because the land is enclosed by a parabola and a straight line. The picture below shows the area. Now given all the intersectant

2016-10-15 20:51:17

hdu1155Bungee Jumping+物理数学计算

Description Once again, James Bond is fleeing from some evil people who want to see him dead. Fortunately, he has left a bungee rope on a nearby highway bridge which he can use to escape from his enem

2016-10-15 20:44:02


Problem Description There are n balls on a smooth horizontal straight track. The track can be considered to be a number line. The balls can be considered to be particles with the same mass.At the begi

2016-10-15 20:36:41

hdu3306Another kind of Fibonacci+矩阵快速幂

Description As we all known , the Fibonacci series : F(0) = 1, F(1) = 1, F(N) = F(N - 1) + F(N - 2) (N >= 2).Now we define another kind of Fibonacci : A(0) = 1 , A(1) = 1 , A(N) = X * A(N - 1) + Y * A

2016-10-15 17:18:52

hdu3306Interesting Yang Yui Triangle+LUCAS定理

Description Harry is a Junior middle student. He is very interested in the story told by his mathematics teacher about the Yang Hui triangle in the class yesterday. After class he wrote the following

2016-10-15 16:21:11


Description 有N对双胞胎,他们的年龄分别是1,2,3,……,N岁,他们手拉手排成一队到野外去玩,要经过一根独木桥,为了安全起见,要求年龄大的和年龄小的排在一起,好让年龄大的保护年龄小的,然后从头到尾,每个人报告自己的年龄,就得到了一个年龄的序列。比如有4对双胞胎,他们报出来的年龄序列是:41312432。突然,他们中间最聪明的小明发现了一个有趣的现象,原来,这个年龄序列有一个规律,两个

2016-10-15 14:45:55



2016-10-15 14:01:51


Description 北宋末年,奸臣当道,宦官掌权,外侮日亟,辽军再犯。时下战火连连,烽烟四起,哀鸿遍野,民不聊生,又有众多能人异士群起而反,天下志士云集响应,景粮影从。 值此危急存亡之秋,在一个与世隔绝的地方—MCA山上一位江湖人称<英雄哪里出来>的人正在为抗击辽贼研究剑法,终于于一雷电交加之夜精确计算出了荡剑回锋的剑气伤害公式。定义 f(x, y, m, n) = sqrt(x*x + y

2016-10-14 20:47:56

hdu5924Mr. Frog’s Problem+打表

Problem Description One day, you, a clever boy, feel bored in your math class, and then fall asleep without your control. In your dream, you meet Mr. Frog, an elder man. He has a problem for you.He gi

2016-10-11 22:43:34

hdu5922Minimum’s Revenge+水题

Problem Description There is a graph of n vertices which are indexed from 1 to n. For any pair of different vertices, the weight of the edge between them is the least common multiple of their indexes.

2016-10-11 22:40:12

CFGym 100803DSpace Golf+物理(数学)计算

给出起点,终点,和n个柱子,小球最多可以在中间弹跳b次。(不算起点,终点),问最小的初速度。 解法:枚举落地次数。 解法类似于http://blog.csdn.net/xtulollipop/article/details/52789712。。 先判断最小速度能不能到达。不能大话他肯定与某个柱子相切。枚举柱子,找到一个能让所有柱子都不相撞的函数。。取最小值。。#include<bits/std

2016-10-11 17:17:34

acdream1221Little Jumper+三分

Problem Description Little frog Georgie likes to jump. Recently he have discovered the new playground that seems the perfect place to jump. Recently the new jumping exercise has become very popular.

2016-10-11 17:06:35

codeforces724B+Batch Sort

You are given a table consisting of n rows and m columns.Numbers in each row form a permutation of integers from 1 to m.You are allowed to pick two elements in one row and swap them, but no more than o

2016-10-09 00:11:20

codeforces724AChecking the Calendar

You are given names of two days of the week.Please, determine whether it is possible that during some non-leap year the first day of some month was equal to the first day of the week you are given, whi

2016-10-09 00:03:04


Problem Description Mr. Frog recently studied how to add two fractions up, and he came up with an evil idea to trouble you by asking you to calculate the result of the formula below: As a talent, can

2016-10-08 23:01:00


勋章 我的勋章
  • 持之以恒