#include<stdio.h> #include<string.h> #include<stdlib.h> #include<ctype.h> #include<algorithm> #define N 1010 using namespace std; int dp[N], path[N][N], w[N]; int main() { int v, n; while(~scanf("%d", &v)) { sca
题目链接: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=995 Problem D: The Necklace My little sister had a beautiful necklace made of colorful beads. Two successive beads in the necklace shared a c
Scandinavians often make vacation during the Easter holidays in the largest ski resort Are. Are provides fantastic ski conditions, many ski lifts and slopes of various difficulty profiles. However, some lifts go faster than others, and some are so po
Compromise In a few months the European Currency Union will become a reality. However, to join the club, the Maastricht criteria must be fulfilled, and this is not a trivial task for the countries (maybe except for Luxembourg). To enforce that Ger
Ignatius and the Princess I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18847 Accepted Submission(s): 6090Special Judge Problem Description The Princess has been abducted by the BEelzebub
FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as large a subset of this data as possible into a sequence so that the weights are increasing, but the speed
Problem Description FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as large a subset of this data as possible into a sequence so that the weights are incre
A. Shortest path of the king time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output The king is left alone on the chessboard. In spite of this loneliness, he doesn't lose heart, because he has busi