自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Alex

开心了就笑,不开心就过会再笑

  • 博客(21)
  • 资源 (1)
  • 收藏
  • 关注

原创 LightOJ1021---Painful Bases (状压dp)

As you know that sometimes base conversion is a painful task. But still there are interesting facts in bases.For convenience let’s assume that we are dealing with the bases from 2 to 16. The valid symb

2015-06-09 20:24:36 1382

原创 LightOJ1020(博弈)

Alice and Bob are playing a game with marbles; you may have played this game in childhood. The game is playing by alternating turns. In each turn a player can take exactly one or two marbles.Both Alice

2015-06-09 19:03:30 1187

原创 LightOJ1017---Brush (III) (dp)

Samir returned home from the contest and got angry after seeing his room dusty. Who likes to see a dusty room after a brain storming programming contest? After checking a bit he found a brush in his ro

2015-06-08 19:56:52 1347

原创 LightOJ1016---Brush (II) (贪心)

After the long contest, Samee returned home and got angry after seeing his room dusty. Who likes to see a dusty room after a brain storming programming contest? After checking a bit he found a brush in

2015-06-08 18:23:47 962

原创 LightOJ1010---Knights in Chessboard (规律题)

Given an m x n chessboard where you want to place chess knights. You have to find the number of maximum knights that can be placed in the chessboard such that no two knights attack each other.Those who

2015-06-08 15:25:15 1584

原创 LightOJ1013---Love Calculator (dp)

Yes, you are developing a ‘Love calculator’. The software would be quite complex such that nobody could crack the exact behavior of the software.So, given two names your software will generate the perc

2015-06-07 22:10:52 1078

原创 LightOJ1012---Guilty Prince (并查集)

Once there was a king named Akbar. He had a son named Shahjahan. For an unforgivable reason the king wanted him to leave the kingdom. Since he loved his son he decided his son would be banished in a ne

2015-06-07 18:09:02 1017

原创 LightOJ1011---Marriage Ceremonies (状压dp)

You work in a company which organizes marriages. Marriages are not that easy to be made, so, the job is quite hard for you.The job gets more difficult when people come here and give their bio-data with

2015-06-06 11:08:45 1371

原创 Codeforces Round #306 (Div. 2)

A.给定一个字符串,问是否存在不重叠的两个串”AB”和”BA”,顺序任意.先从左到右遍历一遍,然后找出最靠左的”AB”的位置和”BA”的位置 然后从右往左遍历一遍,找出最靠右的”BA”的位置和”AB”的位置 然后比较一下就行了/************************************************************************* > File

2015-06-05 22:14:21 901

原创 LightOJ1009---Back to Underworld (bfs染色)

The Vampires and Lykans are fighting each other to death. The war has become so fierce that, none knows who will win. The humans want to know who will survive finally. But humans are afraid of going to

2015-06-05 13:00:35 1315

原创 LightOJ1008---Fibsieve`s Fantabulous Birthday (规律)

Fibsieve had a fantabulous (yes, it’s an actual word) birthday party this year. He had so many gifts that he was actually thinking of not having a party next year.Among these gifts there was an N x N g

2015-06-05 12:25:32 1326

原创 POJ2407---Relatives(求单个数的欧拉函数)

Description Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z > 0 such t

2015-06-04 18:24:27 1674

原创 POJ1284---Primitive Roots(求原根个数, 欧拉函数)

Description We say that integer x, 0 < x < p, is a primitive root modulo odd prime p if and only if the set { (xi mod p) | 1 <= i <= p-1 } is equal to { 1, …, p-1 }. For example, the consecutive power

2015-06-04 18:04:35 1142

原创 LightOJ1007---Mathematically Hard (欧拉函数)

Mathematically some problems look hard. But with the help of the computer, some problems can be easily solvable.In this problem, you will be given two integers a and b. You have to find the summation o

2015-06-04 17:59:16 1499

原创 LightOJ1006---Hex-a-bonacci(矩阵快速幂)

Given a code (not optimized), and necessary inputs, you have to find the output of the code for the inputs. The code is as follows:int a, b, c, d, e, f;int fn( int n ) { if( n == 0 ) return a;

2015-06-03 21:47:34 1060

原创 LightOJ1005---Rooks(简单组合数学)

A rook is a piece used in the game of chess which is played on a board of square grids. A rook can only move vertically or horizontally from its current position and two rooks attack each other if one

2015-06-03 21:10:37 1576

原创 LightOJ1003---Drunk(拓扑排序判环)

One of my friends is always drunk. So, sometimes I get a bit confused whether he is drunk or not. So, one day I was talking to him, about his drinks! He began to describe his way of drinking. So, let m

2015-06-03 10:38:57 1382

原创 LightOJ1002---Country Roads (最短路变形)

I am going to my home. There are many cities and many bi-directional roads between them. The cities are numbered from 0 to n-1 and each road has a cost. There are m roads. You are given the number of m

2015-06-02 20:27:40 1130

原创 hdu2227---Find the nondecreasing subsequences(dp+树状数组)

Problem Description How many nondecreasing subsequences can you find in the sequence S = {s1, s2, s3, …., sn} ? For example, we assume that S = {1, 2, 3}, and you can find seven nondecreasing subseque

2015-06-02 18:52:33 705

原创 Codeforces Round #240 (Div. 1)---B.Mashmokh and ACM(dp)

Mashmokh’s boss, Bimokh, didn’t like Mashmokh. So he fired him. Mashmokh decided to go to university and participate in ACM instead of finding a new job. He wants to become a member of Bamokh’s team. I

2015-06-02 12:41:32 1118

原创 POJ1337---A Lazy Worker(dp)

Description There is a worker who may lack the motivation to perform at his peak level of efficiency because he is lazy. He wants to minimize the amount of work he does (he is Lazy, but he is subject

2015-06-01 23:50:14 741

线段树总结

大牛总结的线段树,很经典很有用,推荐学习

2014-09-30

空空如也

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

TA关注的人

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