自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(55)
  • 收藏
  • 关注

原创 BZOJ2005(74/600)

栋栋有一块长方形的地,他在地上种了一种能量植物,这种植物可以采集太阳光的能量。在这些植物采集能量后, 栋栋再使用一个能量汇集机器把这些植物采集到的能量汇集到一起。 栋栋的植物种得非常整齐,一共有n列,每列 有m棵,植物的横竖间距都一样,因此对于每一棵植物,栋栋可以用一个坐标(x, y)来表示,其中x的范围是1至n, 表示是在第x列,y的范围是1至m,表示是在第x列的第y棵。 由于能量汇集机器较

2017-07-31 19:10:17 226

原创 HDU - 5934(73/600)

here are NN bombs needing exploding. Each bomb has three attributes: exploding radius riri, position (xi,yi)(xi,yi) and lighting-cost cici which means you need to pay cici cost making it explode. If a

2017-07-30 19:53:58 299

原创 HDU6053(72/600)

Problem Description You are given an array A , and Zhu wants to know there are how many different array B satisfy the following conditions?1≤Bi≤AiFor each pair( l , r ) (1≤l≤r≤n) , gcd(bl,bl+1…br)≥2

2017-07-30 16:53:23 259

原创 HDU - 6035(71/600)

There is a tree with nn nodes, each of which has a type of color represented by an integer, where the color of node ii is cici. The path between each two different nodes is unique, of which we define t

2017-07-30 13:15:25 264

原创 HDU - 5816(70/600)

Hearthstone is an online collectible card game from Blizzard Entertainment. Strategies and luck are the most important factors in this game. When you suffer a desperate situation and your only hope dep

2017-07-29 20:02:21 343

原创 HDU - 5521(69/600)

Bessie and her friend Elsie decide to have a meeting. However, after Farmer John decorated his fences they were separated into different blocks. John’s farm are divided into nn blocks labelled from 1

2017-07-29 16:50:38 259

原创 HDU - 5813(68/600)

Being an ACMer requires knowledge in many fields, because problems in this contest may use physics, biology, and even musicology as background. And now in this problem, you are being a city architect!

2017-07-29 14:38:20 274

原创 HDU5950(67/600)

Farmer John likes to play mathematics games with his N cows. Recently, they are attracted by recursive sequences. In each turn, the cows would stand in a line, while John writes two positive numbers a

2017-07-28 20:09:06 358

原创 HDU5952(66/600)

一个有N个点M条边的图,球其中由S个点构成的团的个数。一个团是一个完全子图。 Input 第一行是测试点数。对于每个测试点,第一行包含3个整数N,M和S (N ≤ 100,M ≤ 1000,2 ≤ S ≤ 10),接下来的M行的每一行包含2整数u和v(1 ≤ u < v ≤ N),那就是说那里有一条边在u和v之间。保证顶点最大的度数不超过20。 Output 对于每个测试点,输出一个数表示

2017-07-28 19:04:03 254

原创 HDU5968(65/600)

晨晨在纸上写了一个长度为N的非负整数序列{aiai}。对于这个序列的一个连续子序列{al,al+1,…,aral,al+1,…,ar}晨晨可以求出其中所有数异或的结果 alxoral+1xor…xoraralxoral+1xor…xorar其 中xor表示位异或运算,对应C、C++、 Java等语言中的^运算。 小璐提出了M个询问,每个询问用一个整数 xixi描述。 对于每个询问,晨晨需要找

2017-07-26 20:11:29 446

原创 HDU5965(64/600)

扫雷游戏是晨晨和小璐特别喜欢的智力游戏,她俩最近沉迷其中无法自拔。 该游戏的界面是一个矩阵,矩阵中有些格子中有一个地雷,其余格子中没有地雷。 游戏中,格子可能处于己知和未知的状态。如果一个己知的格子中没有地雷,那么该 格子上会写有一个一位数,表示与这个格子八连通相邻的格子中地雷总的数量。 现在,晨晨和小璐在一个3行N列(均从1开始用连续正整数编号)的矩阵中进 行游戏,在这个矩阵中,第2行的格

2017-07-26 18:03:35 287

原创 codeforces 468A(63/600)

Little X used to play a card game called “24 Game”, but recently he has found it too easy. So he invented a new game.Initially you have a sequence of n integers: 1, 2, …, n. In a single step, you can p

2017-07-26 13:38:00 275

原创 codeforces 534D(62/600)

On February, 30th n students came in the Center for Training Olympiad Programmers (CTOP) of the Berland State University. They came one by one, one after another. Each of them went in, and before sitti

2017-07-26 11:27:52 324

原创 UVA796(61/600)

套上双联通分量的板子 标记一个爹 然后map记一下 舒服#include<bits/stdc++.h>using namespace std;vector<int>tu[101];int liantong[10100], dfn[10100], low[10100], clj = 0, jc = 0;stack<int>zz;map<int,int>mp[10100];void t

2017-07-24 20:19:24 257

原创 HDU2476(60/600)

Problem Description There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. With the help of the painter, you can chang

2017-07-24 18:48:43 345

原创 lightoj 1284(59/600)

You are given a 3D grid, which has dimensions X, Y and Z. Each of the X x Y x Z cells contains a light. Initially all lights are off. You will have K turns. In each of the K turns,You select a cell A

2017-07-23 16:19:01 289

原创 Lightoj 1422(58/600)

Gappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it’s Halloween, these parties are all costume parties, Gapp

2017-07-23 09:34:52 283

原创 HDU - 5727(57/600)

SJX has 2*N magic gems. NN of them have Yin energy inside while others have Yang energy. SJX wants to make a necklace with these magic gems for his beloved BHB. To avoid making the necklace too Yin or

2017-07-22 15:15:19 417

原创 HDU - 5726(56/600)

Give you a sequence of N(N≤100,000)N(N≤100,000) integers : a1,…,an(0#include<bits/stdc++.h>using namespace std;int inf=0x3f3f3f3f;int f[100001][30],tu[100001];int n, m;int gcd(int q,int w){ i

2017-07-22 10:34:18 428

原创 HDU5115(55/600)

Dire wolves, also known as Dark wolves, are extraordinarily large and powerful wolves. Many, if not all, Dire Wolves appear to originate from Draenor. Dire wolves look like normal wolves, but these c

2017-07-21 19:58:39 232

原创 HDU - 5724(54/600)

Alice and Bob are playing a special chess game on an n × 20 chessboard. There are several chesses on the chessboard. They can move one chess in one turn. If there are no other chesses on the right adja

2017-07-21 18:55:15 291

原创 HDU5723(53/600)

An abandoned country has n(n≤100000)n(n≤100000) villages which are numbered from 1 to nn. Since abandoned for a long time, the roads need to be re-built. There are m(m≤1000000)m(m≤1000000) roads to be

2017-07-21 14:38:55 258

原创 HDU2067(52/600)

卡特兰会在33左右爆long long 所以一般不用直接递推#include<bits/stdc++.h>using namespace std;#define int unsigned long longint kate[60]; main(){ kate[1]=kate[0]=1; for(int a=2;a<=35;a++) { for(i

2017-07-20 10:19:43 252

原创 HDU2049(51/600)

错排公式 fn=(n-1)(fn-1 +fn-2)#include<bits/stdc++.h>using namespace std;#define int unsigned long longint f[90]; main(){ int T; cin>>T; while(T--) { int n,m; cin>>

2017-07-19 19:08:47 215

原创 HUST1214(50/600)

A positive integer n is called cubic-free, if it can’t be written in this form n = x*x*x*k, while x is a positive integer larger than 1. Now give you two Integers L and R, you should tell me how many c

2017-07-18 19:11:52 279

原创 Ural 1114(49/600)

N boxes are lined up in a sequence (1 ≤ N ≤ 20). You have A red balls and B blue balls (0 ≤ A ≤ 15, 0 ≤ B ≤ 15). The red balls (and the blue ones) are exactly the same. You can place the balls in the b

2017-07-18 16:08:58 355

原创 Ural 1091(48/600)

University of New Tmutarakan trains the first-class specialists in mental arithmetic. To enter the University you should master arithmetic perfectly. One of the entrance exams at the Divisibility Depar

2017-07-18 14:36:12 282

原创 CodeForces - 830B(47/600)

Vasily has a deck of cards consisting of n cards. There is an integer on each of the cards, this integer is between 1 and 100 000, inclusive. It is possible that some cards have the same integers on th

2017-07-18 11:57:57 323

原创 Codeforces 830A(46/600)

There are n people and k keys on a straight line. Every person wants to get to the office which is located on the line as well. To do that, he needs to reach some point with a key, take the key and the

2017-07-17 20:08:12 301

原创 ZOJ 3233(45/600)

Watashi loves M mm very much. One day, M mm gives Watashi a chance to choose a number between low and high, and if the choosen number is lucky, M mm will marry him.M mm has 2 sequences, the first one i

2017-07-17 16:08:18 363

原创 codeforces 818D(44/600)

Alice and Bob got very bored during a long car trip so they decided to play a game. From the window they can see cars of different colors running past them. Cars are going one after another.The game ru

2017-07-17 00:43:31 343

原创 51nod1366(43/600)

一个国家有N个公民,标记为0,1,2,…,N-1,每个公民有一个存款额。已知每个公民有一些朋友,同时国家有一条规定朋友间的存款额之差不能大于d。也就是说,a和b是朋友的话,a有x元的存款,b有y元,那么|x-y|<=d。给定d值与N个人的朋友关系,求这个国家最富有的人和最贫穷的人的存款相差最大的可能值是多少?即求贫富差距的最大值的下界。若这个值为无穷大,输出-1. Input 多组测试数据,第

2017-07-16 16:56:14 332

原创 HDU - 2149(42/600)

虽然不想,但是现实总归是现实,Lele始终没有逃过退学的命运,因为他没有拿到奖学金。现在等待他的,就是像FarmJohn一样的农田生涯。 要种田得有田才行,Lele听说街上正在举行一场别开生面的拍卖会,拍卖的物品正好就是一块20亩的田地。于是,Lele带上他的全部积蓄,冲往拍卖会。 后来发现,整个拍卖会只有Lele和他的死对头Yueyue。 通过打听,Lele知道这场拍卖的规则是这样的:刚开始底价为

2017-07-16 14:13:07 258

原创 HDU - 3863(41/600)

这种题先手要是赢不了那顶多也是平局#include<bits/stdc++.h>using namespace std;#define int long long main(){ int T; int u=0; while(cin>>u) { if(u==-1)break; printf("I bet on Oregon Map

2017-07-16 13:19:14 330

原创 HDU - 3389(40/600)

Bob and Alice are playing a new game. There are n boxes which have been numbered from 1 to n. Each box is either empty or contains several cards. Bob and Alice move the cards in turn. In each turn the

2017-07-16 11:35:08 348

原创 HDU - 3032(39/600)

Nim is a two-player mathematic game of strategy in which players take turns removing objects from distinct heaps. On each turn, a player must remove at least one object, and may remove any number of ob

2017-07-16 09:46:22 535

原创 HDU - 2897(38/600)

当日遇到月,于是有了明。当我遇到了你,便成了侣。 那天,日月相会,我见到了你。而且,大地失去了光辉,你我是否成侣?这注定是个凄美的故事。(以上是废话) 小t和所有世俗的人们一样,期待那百年难遇的日食。驻足街头看天,看日月渐渐走近,小t的脖子那个酸呀(他坚持这个姿势已经有半个多小时啦)。他低下仰起的头,环顾四周。忽然发现身边竟站着位漂亮的mm。天渐渐暗下,这mm在这街头竟然如此耀眼,她是天使吗

2017-07-11 20:05:18 261

原创 HDU - 2516(37/600)

1堆石子有n个,两人轮流取.先取者第1次可以取任意多个,但不能全部取完.以后每次取的石子数不能超过上次取子数的2倍。取完者胜.先取者负输出”Second win”.先取者胜输出”First win”. Input 输入有多组.每组第1行是2<=n<2^31. n=0退出. Output 先取者负输出”Second win”. 先取者胜输出”First win”. 参看Sample O

2017-07-11 18:33:28 241

原创 Codeforces 796D(36/600)

Inzane finally found Zane with a lot of money to spare, so they together decided to establish a country of their own.Ruling a country is not an easy job. Thieves and terrorists are always ready to ruin

2017-07-11 00:03:42 319

原创 codeforces 579D(35/600)

You are given n numbers a1, a2, …, an. You can perform at most k operations. For each operation you can multiply one of the numbers by x. We want to make as large as possible, where denotes the bitwi

2017-07-10 17:52:53 515

空空如也

空空如也

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

TA关注的人

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