自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

WZJRJ28

为了看到更大的世界

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

原创 LA 3266 Tian Ji -- The Horse Racing (贪心 || DP)

Problem Description Here is a famous story in Chinese history. "That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the king

2016-04-30 23:18:06 477

原创 Codeforces Round #349 (Div. 2) C. Reberland Linguistics

First-rate specialists graduate from Berland State Institute of Peace and Friendship. You are one of the most talented students in this university. The education is not easy because you need to have f

2016-04-30 22:21:11 1267

原创 LA 4850 Installations (贪心)

Description In the morning, service engineers in a telecom company receive a list of jobs which they must serve today. They install telephones, internet, ipTVs, etc and repair troubles with establ

2016-04-29 20:17:51 2097

原创 LA 4725 Airport

Airport A big city has an international airport handling 40 million passengers a year. But this is notorious as one of the most congested airports in the world. In this airport, there is only one lan

2016-04-28 19:45:02 953

原创 Uva 11100 The Trip

题目大意: 给n个正整数,把它们划分成尽量少的严格递增序列(前一个数必须小于后一个数)。问序列的最小个数和这些序列。 分析:很容易想到最小次数就是数列中重复出现最多的数的出现次数,然后这道题输出方案上有些技巧,每次输出序列下标膜ans同余的子序列,这样肯定可以完全按升序分割掉 整个序列。 #include #include #include #define MAXN 1000

2016-04-28 16:51:31 328

原创 Uva 11134 Fabled Rooks

链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=2075 题目大意: 在一个n*n的棋盘上放置n个车,使得它们之间都不能互相攻击(任意两个车都不能同行或同列),并且,对于第i个车,限制它只能放在一个矩形区域内,(xl

2016-04-28 00:33:46 356

原创 POJ-2115 C Looooops

Description A Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; variable += C) statement; I.e., a loop which starts by setting variable to

2016-04-27 23:03:19 403

原创 POJ-1845 Sumdiv

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

2016-04-26 21:57:42 678

原创 UVa 11627 Slalom (二分)

You are competing in a ski slalom, and you need to selectthe best skis for the race. The format of the race is that there areNpairs of left and right gates, where each right gate isW metres to the rig

2016-04-26 17:33:21 535

原创 LA 4254 Processor (单调队列 + 二分)

题意:有n个任务,每个任务有三个参数,ri,di,wi,表示在ri di之内需要执行完工作量为wi的任务,任务可以分块执行,求执行过程中的最大速度的最小值。速度需为整数。 分析:二分判断,判断有些复杂,要用到单调队列,写的挺烂的,但是一遍过了。 #include #include #include #include #include #define MAXN 10002

2016-04-25 21:21:35 938

原创 Codeforces Round 669D Little Artem and Time Machine

Little Artem has invented a time machine! He could go anywhere in time, but all his thoughts of course are with computer science. He wants to apply this time machine to a well-known data structure: m

2016-04-25 09:30:16 587

原创 Uva 10905 Children's Game

题意:给定n个正整数,求他们能拼接成的最大整数是多少。 白书诚不欺我,果然wa了好久.... #include #include #include #include using namespace std; int n; string s[51]; bool camp(string a,string b) { return a + b > b + a; } int mai

2016-04-24 23:12:42 256

原创 Uva 10382 Watering Grass

WA了一个晚上,然后是发现栈没清空,一直以为是精度问题。 #include #include #include #include #include using namespace std; struct thing { double left,right; } point[10002]; bool camp(thing a,thing b) { if(abs(a.right-b

2016-04-24 10:12:23 327

原创 LA 4794 Sharing Chocolate

题意:给出一个长宽确定的矩形,每次可以沿一条直线把它分课程两块长宽都为整数的巧克力,问能否通过多次操作得到n块面积分别为a1,a2...an的巧克力。 分析:白书原题,状压DP+记忆化搜索。 #include #include #include using namespace std; int n,x,y,num,a[16],sum[1<<15],jud[101][1<<15],

2016-04-23 14:53:07 647

原创 LA 3983 Robotruck

白书原题,简单的单调队列。 #include #include #include #define MAXN 100010 using namespace std; int t,T,c,n,x[MAXN],y[MAXN],d[MAXN],f[MAXN],dis[MAXN],q[MAXN],w[MAXN]; int main() { cin.sync_with_stdio(false);

2016-04-23 13:40:33 446

原创 hdu-1890 Robotic Sort

Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3477    Accepted Submission(s): 1504 Problem Description Somewhere deep in the Czech Tec

2016-04-21 22:41:15 450

原创 POJ-3468 A Simple Problem with Integers(Splay实现)

POJ 3468 A Simple Problem with Integers(Splay实现)

2016-04-21 13:42:34 308

原创 POJ-3292 Semi-prime H-numbers

Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8564   Accepted: 3739 Description This problem is based on an exercise of David Hilbert, who pedagogically suggested t

2016-04-19 22:01:30 314

原创 POJ-2635 The Embarrassed Cryptographer

Description The young and very promising cryptographer Odd Even has implemented the security module of a large system with thousands of users, which is now in use in his company. The cryptographic

2016-04-18 22:06:12 331

原创 Codeforces 658D Bear and Polynomials

Limak is a little polar bear. He doesn't have many toys and thus he often plays with polynomials. He considers a polynomial valid if its degree is n and its coefficients are integers not exceedin

2016-04-16 22:00:37 550

原创 POJ-1942 Paths on a Grid

Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 24046   Accepted: 5947 Description Imagine you are attending your math lesson at school. Once again, you are bored because

2016-04-15 21:48:25 379

原创 POJ-1019 Number Sequence

Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 37441   Accepted: 10807 Description A single positive integer i is given. Write a program to find the digit located in the

2016-04-15 20:47:54 599

原创 POJ-1850 Code

Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 9132   Accepted: 4360 Description Transmitting and memorizing information is a task that requires different coding systems

2016-04-15 18:57:53 198

原创 POJ-3252 Round Numbers

Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 11424   Accepted: 4282 Description The cows, as you know, have no fingers or thumbs and thus are unable to play Scissors

2016-04-15 15:52:44 212

原创 POJ-1191 棋盘分割

Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 13871   Accepted: 4932 Description 将一个8*8的棋盘进行如下分割:将原棋盘割下一块矩形棋盘并使剩下部分也是矩形,再将剩下的部分继续如此分割,这样割了(n-1)次后,连同最后剩下的矩形棋盘共有n块矩形棋

2016-04-14 11:58:05 334

原创 POJ-1691 Painting A Board

Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 3616   Accepted: 1798 Description The CE digital company has built an Automatic Painting Machine (APM) to paint a flat

2016-04-13 21:15:56 334

原创 POJ-3373 (DP)

Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 3240   Accepted: 1055 Description Given two positive integers n and k, you are asked to generate a new integer, say m,

2016-04-12 20:30:14 803

原创 POJ-1724 ROADS

Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 12451   Accepted: 4597 Description N cities named with numbers 1 ... N are connected with one-way roads. Each road has

2016-04-11 22:36:05 211

原创 Problem 1608 - Calculation

Time Limit: 500MS   Memory Limit: 65536KB   Total Submit: 343  Accepted: 96  Special Judge: No Description Today, Alice got her math homework again! She had n integers, and she needed to di

2016-04-11 00:10:56 280

原创 POJ-3411 Paid Roads

Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6472   Accepted: 2398 Description A network of m roads connects N cities (numbered from 1 to N). There may be more than

2016-04-07 22:32:18 396

原创 POJ-2513 Colored Sticks

Time Limit: 5000MS   Memory Limit: 128000K Total Submissions: 34372   Accepted: 8976 Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with so

2016-04-07 21:06:45 472

原创 POJ-3253 Fence Repair

Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 37213   Accepted: 12053 Description Farmer John wants to repair a small length of the fence around the pasture. He mea

2016-04-06 22:13:20 245

原创 POJ-2503 Babelfish

Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 38865   Accepted: 16594 Description You have just moved from Waterloo to a big city. The people here speak an incompre

2016-04-06 21:27:17 292

原创 POJ-2002 Squares

Time Limit: 3500MS   Memory Limit: 65536K Total Submissions: 18416   Accepted: 7081 Description A square is a 4-sided polygon whose sides have equal length and adjacent sides form 9

2016-04-05 21:30:20 287

原创 POJ-1840 Eqs

Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 14929   Accepted: 7329 Description Consider equations having the following form: a1x13+ a2x23+ a3x33+ a4x43+ a5x53=0 The

2016-04-05 20:36:36 315

原创 POJ-2151 Check the difficulty of problems

Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 6332   Accepted: 2756 Description Organizing a programming contest is not an easy job. To avoid making the problems too di

2016-04-03 20:45:06 283

空空如也

空空如也

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

TA关注的人

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