POJ
文章平均质量分 86
庇耳拉海莱
这个作者很懒,什么都没留下…
展开
-
POJ 1979 Red and Black
POJ 1979 Red and BlackDescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of原创 2017-09-14 18:40:46 · 230 阅读 · 0 评论 -
POJ 2229 Sumsets
DescriptionFarmer 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 num原创 2017-09-21 23:44:17 · 231 阅读 · 0 评论 -
POJ 3262
Protecting the FlowersTime Limit: 2000MS Memory Limit: 65536K Total Submissions: 8037 Accepted: 3247DescriptionFarmer John went to cut some wood and left N (2 ≤ N ≤ 100,000) cows eating the g原创 2017-10-08 20:18:51 · 1216 阅读 · 0 评论 -
POJ1862 水
StripiesTime Limit: 1000MS Memory Limit: 30000K Total Submissions: 18021 Accepted: 8109DescriptionOur chemical biologists have invented a new very useful form of life called stripies (in f原创 2017-10-08 19:37:27 · 976 阅读 · 0 评论 -
POJ3040
#include<cstdio>#include<algorithm>#include<cstring>using namespace std;const int maxn = 23;int N, C;struct node{ int price; int amount; bool operator < (const node& n) const{原创 2017-10-08 19:09:49 · 1312 阅读 · 0 评论 -
POJ 3176
Cow BowlingTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 20173 Accepted: 13372DescriptionThe cows don’t use actual bowling balls when they go bowling. They each take a number原创 2017-09-20 21:50:06 · 302 阅读 · 0 评论 -
POJ 3187 Backward Digit Sums
Backward Digit SumsTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 7854 Accepted: 4518DescriptionFJ and his cows enjoy playing a mental game. They write down the numbers from 1 to原创 2017-09-27 16:18:56 · 955 阅读 · 0 评论 -
POJ 2718 Smallest Difference
Smallest DifferenceTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 12711 Accepted: 3448DescriptionGiven a number of distinct decimal digits, you can form one integer by choosing原创 2017-09-27 15:34:10 · 275 阅读 · 0 评论 -
POJ 1036 Gangsters
GangstersTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 13041 Accepted: 3728DescriptionN gangsters are going to a restaurant. The i-th gangster comes at the time Ti and has the原创 2017-09-27 14:33:18 · 249 阅读 · 0 评论 -
POJ 3253
#include<cstdio>const int maxn = 40000+5;int L[maxn];int N;void swap(int& a, int& b){ int c = a; a = b; b = c;}void solve(){ long long ans = 0; //求出最短的板m1和倒数第二短的板m2 while(N原创 2017-09-01 20:37:44 · 219 阅读 · 0 评论 -
POJ3617
#include<cstdio>#include<iostream>using namespace std;const int maxn = 2000 + 5;int N;char S[maxn];void solve() { bool left = false; int x = 0; int y = N - 1; int cnt = 0; while原创 2017-09-01 16:45:11 · 182 阅读 · 0 评论 -
POJ 2785 4 Values whose sum is 0
4 Values whose Sum is 0Time Limit: 15000MS Memory Limit: 228000K Total Submissions: 24017 Accepted: 7283 Case Time Limit: 5000MSDescriptionThe SUM problem can be formulated as follows: giv原创 2017-09-10 19:29:12 · 231 阅读 · 0 评论 -
POJ 2386
#include<cstdio>int N, M, ans;char f[105][105];bool vis[105][105];void dfs(int x, int y) { f[x][y] = '.'; for (int dx = -1; dx <= 1; dx++) { for (int dy = -1; dy <= 1; dy++) {原创 2017-09-01 15:02:44 · 190 阅读 · 0 评论 -
Aggressive cows
DescriptionFarmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,…,xN (0 <= xi <= 1,000,000,000). His C (2 <= C <= N) co原创 2017-09-08 20:09:14 · 237 阅读 · 0 评论 -
POJ 1163 The Triangle
Description7 3 8 8 1 0 2 7 4 4 4 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that starts at t原创 2017-09-08 14:22:32 · 183 阅读 · 0 评论 -
POJ 1321 棋盘问题
Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <=原创 2017-09-16 20:04:48 · 212 阅读 · 0 评论 -
POJ 2385 Apple Catching
Apple CatchingTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 13283 Accepted: 6462DescriptionIt is a little known fact that cows love apples. Farmer John has two apple trees (wh原创 2017-09-22 21:49:13 · 462 阅读 · 0 评论 -
POJ 1088 滑雪
DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714 23原创 2018-01-05 00:26:57 · 197 阅读 · 0 评论