![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
2017暑假集训题目
文章平均质量分 78
菜圾
Hi, it's your Accepted !
展开
-
POJ-3268-Disease Management-(最短路径spfa)
One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M≤ 100,000) unidirectional (one-way roads connects pairs of farms; road i requires Ti (1 ≤ Ti ≤原创 2017-08-22 17:44:59 · 328 阅读 · 0 评论 -
Cube--(三维树状数组)
Total Submission(s) : 5 Accepted Submission(s) : 4Problem DescriptionGiven an N*N*N cube A, whose elements are either 0 or 1. A[i, j, k] means the number in the i-th row , j-th column and k-原创 2017-08-22 12:05:52 · 336 阅读 · 0 评论 -
Shredding Company--(DFS)
DescriptionYou have just been put in charge of developing a new shredder for the Shredding Company Although a "normal" shredder would just shred sheets of paper into little pieces so that the contents...原创 2017-08-07 20:17:45 · 440 阅读 · 0 评论 -
Terrible Sets--(单调队列)
Terrible SetsTime Limit : 2000/1000ms (Java/Other) Memory Limit : 60000/30000K (Java/Other)Total Submission(s) : 29 Accepted Submission(s) : 16Problem DescriptionLet N be the set o原创 2017-08-15 10:09:21 · 248 阅读 · 0 评论 -
Flowers--(树状数组,离散化)
Problem DescriptionAs is known to all, the blooming time and duration varies between different kinds of flowers. Now there is a garden planted full of flowers. The gardener wants to know how many原创 2017-08-22 10:21:37 · 312 阅读 · 0 评论 -
POJ 3190 Stall Reservations
POJ 3190 Stall ReservationsOh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some precise time interval A..B (1 <= A <= B <= 1,000,000), which includes both times A and B. Obviou原创 2017-08-24 21:34:08 · 264 阅读 · 0 评论 -
POJ-3186-Treats for the Cows-动态规划DP
FJ has purchased N (1 The treats are interesting for many reasons:The treats are numbered 1..N and stored sequentially in single file in a long box that is open at both ends. On any day, FJ ca原创 2017-08-24 20:21:42 · 242 阅读 · 0 评论 -
Sticks Problem--(单调队列)
Xuanxuan has n sticks of different length. One day, she puts all her sticks in a line, represented by S1, S2, S3, ...Sn. After measuring the length of each stick Sk (1 <= k <= n), she finds that for some sticks Si and Sj (1<= i < j <= n), each stick placed原创 2017-08-14 21:30:24 · 631 阅读 · 1 评论 -
Largest Submatrix of All 1’s--(单调队列)
Problem DescriptionGiven a m-by-n (0,1)-matrix, of all its submatrices of all 1’s which is the largest? By largest we mean that the submatrix has the most elements. Input<p>The input contains multiple test cases. Each test case begins with <i>m</i> an原创 2017-08-14 20:21:50 · 433 阅读 · 0 评论 -
Find the nondecreasing subsequences--(树状数组)
Problem DescriptionHow 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 sub原创 2017-08-21 18:13:37 · 278 阅读 · 0 评论 -
Largest Rectangle in a Histogram--(单调队列orDP)
A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figure on the left shows the histogram that consists of rectangles with the heigh原创 2017-08-11 15:51:39 · 491 阅读 · 0 评论 -
Feel Good
Feel Good Bill is developing a new mathematical theory for human emotions. His recent investigations are dedicated to studying how good or bad days influent people's memories about some period of life. A new idea Bill has recently developed assigns a n原创 2017-08-14 16:44:36 · 399 阅读 · 0 评论 -
基本二维树状数组
Problem DescriptionNow I am leaving hust acm. In the past two and half years, I learned so many knowledge about Algorithm and Programming, and I met so many good friends. I want to say sorry to Mr原创 2017-08-21 14:52:04 · 217 阅读 · 0 评论 -
UVA1428 Ping pong(树状数组)
题目:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4174题解:http://blog.csdn.net/u013480600/article/details/20912063这个题目是求一个数左边和右边比它小和比他大的数的个数,题解给出最简洁原创 2017-08-21 10:50:56 · 196 阅读 · 0 评论 -
Bad Hair Day--(单调队列)
Bad Hair DayTime Limit : 4000/2000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 48 Accepted Submission(s) : 17Problem DescriptionSome of Farmer J原创 2017-08-14 10:04:24 · 518 阅读 · 0 评论 -
哈密尔顿环
#include#include#include#include#include#include#include#includeusing namespace std;#define maxn 101bool visit[maxn],v1[maxn];int ans[maxn],num[maxn],g[maxn][maxn];int x,n,m,length;void p原创 2017-08-05 17:40:21 · 449 阅读 · 0 评论 -
快速排序--递归算法
快速排序--递归算法#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;#define pi 3.14159265358979#define inf 0x7fffffffint a[10000原创 2017-08-12 17:55:44 · 379 阅读 · 0 评论 -
Drying--(二分)
DryingTime Limit : 4000/2000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 72 Accepted Submission(s) : 22Problem DescriptionIt is very hard to was原创 2017-08-12 11:50:04 · 251 阅读 · 0 评论 -
poj-2182-Lost Cows (树状数组,线段树)
Problem DescriptionN (2 <= N <= 8,000) cows have unique brands in the range 1..N. In a spectacular display of poor judgment, they visited the neighborhood 'watering hole' and drank a few too many原创 2017-08-24 10:56:14 · 274 阅读 · 0 评论 -
16级暑假练习赛二--A--(搜索)
Bessie is in Camelot and has encountered a sticky situation: she needs to pass through the forest that is guarded by the Knights of Ni. In order to pass through safely, the Knights have demanded that原创 2017-08-15 19:07:45 · 235 阅读 · 0 评论 -
HDU-2688-Rotate-(树状数组)
HDU-2688-Rotate-(树状数组)Recently yifenfei face such a problem that give you millions of positive integers,tell how many pairs i and j that satisfy F[i] smaller than F[j] strictly when i is smaller than j strictly. i and j is the serial number in the interge原创 2017-08-23 19:59:37 · 236 阅读 · 0 评论 -
HDU-1394-Minimum Inversion Number-(树状数组)
HDU-1394-Minimum Inversion Number-(树状数组)The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai > aj.For a given sequence of numbers a1, a2, ..., an, if we move the first m >= 0 numbers t原创 2017-08-22 23:02:12 · 288 阅读 · 0 评论 -
POJ 1990 MooFest (树状数组)
POJ 1990 MooFest (树状数组)Every year, Farmer John's N (1 <= N <= 20,000) cows attend "MooFest",a social gathering of cows from around the world. MooFest involves a variety of events including haybale stacking, fence jumping, pin the tail on the farmer, and o原创 2017-08-25 17:37:30 · 242 阅读 · 0 评论 -
Agri-Net--(最小生成树)
Agri-NetTime Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 86 Accepted Submission(s) : 19Problem DescriptionFarmer John has been elected mayor of h...原创 2017-08-07 15:24:24 · 299 阅读 · 0 评论 -
Frogger
FroggerTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 168 Accepted Submission(s) : 33Problem DescriptionFreddy Frog is sitting原创 2017-08-08 10:53:03 · 909 阅读 · 1 评论 -
Currency Exchange--(最短路径算法)
Currency ExchangeTime Limit : 2000/1000ms (Java/Other) Memory Limit : 60000/30000K (Java/Other)Total Submission(s) : 74 Accepted Submission(s) : 19Problem DescriptionSeveral curren原创 2017-08-08 19:36:39 · 3629 阅读 · 0 评论 -
Wormholes-(Bellman-Frod)
While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that is BEFORE you entered the wormhole! Each of FJ's farms co原创 2017-08-08 21:41:44 · 227 阅读 · 0 评论 -
昂贵的聘礼
昂贵的聘礼Time Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 69 Accepted Submission(s) : 22Problem Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的原创 2017-08-09 10:41:05 · 253 阅读 · 0 评论 -
Stockbroker Grapevine--(Floyed-Warshall)
Stockbroker GrapevineTime Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 33 Accepted Submission(s) : 21Problem DescriptionStockbroke原创 2017-08-09 11:40:45 · 207 阅读 · 0 评论 -
Arbitrage--(Bellman—Ford)
ArbitrageTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 48 Accepted Submission(s) : 18Problem DescriptionArbitrage is the use原创 2017-08-09 13:08:18 · 191 阅读 · 0 评论 -
Truck History-(prime-算法)
Truck HistoryTime Limit : 4000/2000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 67 Accepted Submission(s) : 23Problem DescriptionAdvanced Cargo Movement, Ltd. use...原创 2017-08-09 15:54:03 · 247 阅读 · 0 评论 -
Borg Maze--(prime+BFS)
Borg MazeTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 71 Accepted Submission(s) : 22Problem DescriptionThe Borg is an immens原创 2017-08-09 19:42:21 · 298 阅读 · 0 评论 -
16级暑假练习赛二--F
Farmer John commanded his cows to search for different sets of numbers that sum to a given number. The cows use only numbers that are an integer power of 2. Here are the possible sets of numbers that原创 2017-08-15 19:32:50 · 287 阅读 · 0 评论 -
POJ - 3625-Rigging the Bovine Election-(Kruskal,最小生成树)
Farmer John had just acquired several new farms! He wants to connect the farms with roads so that he can travel from any farm to any other farm via a sequence of roads; roads already connect some of t原创 2017-08-22 19:42:39 · 201 阅读 · 0 评论 -
POJ - 2437 Ant Counting
Farmer John has a problem: the dirt road from his farm to town has suffered in the recent rainstorms and now contains (1 Farmer John has a collection of wooden planks of length L that he can use t原创 2017-08-22 17:51:57 · 218 阅读 · 0 评论 -
poj-1656-Counting Black-(树状数组)
There is a board with 100 * 100 grids as shown below. The left-top gird is denoted as (1, 1) and the right-bottom grid is (100, 100). We may apply three commands to the board: 1. WHITE x, y,原创 2017-08-25 21:12:18 · 459 阅读 · 0 评论 -
POJ 2155 Matrix(二维树状数组)
POJ 2155 Matrix(二维树状数组)Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 <= i, j <= N). We can change the matrix in the following way. Given a rectangle wh原创 2017-08-25 15:52:13 · 211 阅读 · 0 评论 -
poj-3321-Apple Tree-(树状数组)
Apple TreeTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 30537 Accepted: 9130DescriptionThere is an apple tree outside of kaka's house. Every autumn,原创 2017-08-19 10:36:03 · 393 阅读 · 0 评论 -
Curling 2.0
Problem DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on wh原创 2017-08-04 19:38:49 · 316 阅读 · 0 评论 -
Pie
PieTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 135 Accepted Submission(s) : 27Special JudgeProblem DescriptionMy birthday is coming up and ...原创 2017-08-10 12:12:52 · 212 阅读 · 0 评论