自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

xtulollipop

物质都是数据,规则都是代码。这世间有万千代码,万物都可编译。 Talk is cheap,show me the code。

  • 博客(228)
  • 收藏
  • 关注

原创 JAVA排序方法

数组排序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 475

原创 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 882

原创 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 549

原创 xtu补考题解

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

2016-11-01 21:07:54 1975 1

原创 hdu2529Shot+三分

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

2016-10-15 20:55:48 418

原创 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 1873

原创 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 377

原创 hdu5826physics+数学积分

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 330

原创 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 316

原创 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 432

原创 hdu2554N对数的排列问题+数学推论

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

2016-10-15 14:45:55 974

原创 hdu2552三足鼎立+数学推论

MCA山中人才辈出,洞悉外界战火纷纷,山中各路豪杰决定出山拯救百姓于水火,曾以题数扫全场的威士忌,曾经高数九十九的天外来客,曾以一剑铸十年的亦纷菲,歃血为盟,盘踞全国各个要塞(简称全国赛)遇敌杀敌,遇佛杀佛,终于击退辽军,暂时平定外患,三人位置也处于稳态。可惜辽誓不甘心,辽国征南大将军<耶律javac++>欲找出三人所在逐个击破,现在他发现威士忌的位置s,天外来客的位置u,不过很难探查到亦纷菲v所在

2016-10-15 14:01:51 372

原创 hud2547无剑无我+水题

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

2016-10-14 20:47:56 543

原创 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 751

原创 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 762

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

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

2016-10-11 17:17:34 559

原创 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 490

原创 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 1038

原创 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 561

原创 hdu5912Fraction+式子计算

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 475

原创 hdu5914Triangle+打表

Triangle Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 338 Accepted Submission(s): 229Problem Description Mr. Frog has n sticks, whose l

2016-10-08 22:58:55 519

原创 hdu5916Harmonic Value Description+构造

Problem Description The harmonic value of the permutation p1,p2,⋯pn is ∑n−1i=1gcd(pi.pi+1)∑_{i=1}^{n−1}gcd(p_i.p_{i+1})Mr. Frog is wondering about the permutation whose harmonic value is the strictly

2016-10-08 22:55:21 775

原创 hdu5918Sequence I+KMP

Problem Description Mr. Frog has two sequences a1,a2,⋯,an and b1,b2,⋯,bm and a number p. He wants to know the number of positions q such that sequence b1,b2,⋯,bm is exactly the sequence aq,aq+p,aq+2p,

2016-10-08 22:41:49 346

原创 hdu5596GTW likes gt+倒推

Problem Description Long long ago, there were n adorkable GT. Divided into two groups, they were playing games together, forming a column. The i−th GT would randomly get a value of ability bi. At the

2016-10-08 16:52:46 261

原创 hdu5597GTW likes function+欧拉函数

Problem Description Now 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)f(x)=∑^x_{k=0}(−1)^k2^{2x−2k}C^k_{2x−k+1},f_0(x)=f(x),f_n(x)=f(f_{n−1}(x)

2016-10-08 15:45:28 295

原创 hdu5584LCM Walk+gcd

Problem Description A frog has just learned some number theory, and can’t wait to show his ability to his girlfriend.Now the frog is sitting on a grid map of infinite rows and columns. Rows are number

2016-10-07 21:04:39 552

原创 hdu5572An Easy Physics Problem+计算几何

An Easy Physics Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1501 Accepted Submission(s): 289Problem Description On an infinite

2016-10-05 23:52:16 1107

原创 hdu5533Dancing Stars on Me+凸包

Problem Description The sky was brushed clean by the wind and the stars were cold in a black sky. What a wonderful night. You observed that, sometimes the stars can form a regular polygon in the sky i

2016-10-05 16:49:12 331

原创 hdu5531Rebuild+三分

Problem Description Archaeologists find ruins of Ancient ACM Civilization, and they want to rebuild it.The ruins form a closed path on an x-y plane, which has n endpoints. The endpoints locate on (x1,

2016-10-05 16:18:14 570

原创 hdu5524Subtrees+递归模拟

Problem Description There is a complete binary tree with N nodes.The subtree of the node i has Ai nodes.How many distinct numbers are there of Ai?Input There are multiple test cases, no more than 100

2016-10-04 22:35:53 477

原创 codeforces281CRectangle Puzzle+矩形旋转+面积交

DescriptionYou are given two rectangles on a plane. The centers of both rectangles are located in the origin of coordinates (meaning the center of the rectangle’s symmetry). The first rectangle’s sides

2016-10-04 13:53:02 1139

原创 codeforces723DLakes in Berland+BFS

The map of Berland is a rectangle of the size n × m, which consists of cells of size 1 × 1. Each cell is either land or water. The map is surrounded by the ocean.Lakes are the maximal regions of water

2016-10-03 23:15:27 505

原创 codeforces723CPolycarp at the Radio+模拟

Polycarp is a music editor at the radio station. He received a playlist for tomorrow, that can be represented as a sequence a1, a2, …, an, where ai is a band, which performs the i-th song. Polycarp lik

2016-10-03 23:04:02 454

原创 codeforces723BText Document Analysis+水题

Modern text editors usually show some information regarding the document being edited. For example, the number of words, the number of pages, or the number of characters.In this problem you should impl

2016-10-03 23:00:21 502

原创 codeforces723AThe New Year: Meeting Friends+水题

There are three friend living on the straight line Ox in Lineland. The first friend lives at the point x1, the second friend lives at the point x2, and the third friend lives at the point x3. They plan

2016-10-03 22:56:26 562

原创 Gym100714A Alien Visit+多个圆的并面积

25 May, 1997, near Elcino-Borisovo place, Jandal region, strange signs were found in the field… Witness: “First, I saw only one UFO. It was shining with cold-blue light.Closer to the center of the ob

2016-10-03 15:40:28 538

原创 poj1845Sumdiv+约数和定理

Description Consider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of S by 9901).Input The only line contains the two

2016-10-03 14:21:45 326

原创 hdu5297Y sequence+容斥+迭代

Description Yellowstar likes integers so much that he listed all positive integers in ascending order,but he hates those numbers which can be written as a^b (a, b are positive integers,2<=b<=r),so he

2016-10-02 22:19:05 392

原创 hdu5514Frogs+容斥

Problem Description There are m stones lying on a circle, and n frogs are jumping over them. The stones are numbered from 0 to m−1 and the frogs are numbered from 1 to n. The i-th frog can jump over

2016-10-01 22:43:32 1131

原创 hdu5525Product+约数的乘积

Product Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1003 Accepted Submission(s): 231Problem Description Given a number sequence A1,A

2016-09-30 00:19:44 585

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除