UVa OJ 10055】的更多相关文章

Problem A Hashmat the brave warrior Input: standard input Output: standard output Hashmat is a brave warrior who with his group of young soldiers moves from one place to another to fight against his opponents. Before fighting he just calculates one t…
/* 一张有20个顶点的图上. 依次输入每个点与哪些点直接相连. 并且多次询问两点间,最短需要经过几条路才能从一点到达另一点. bfs 水过 */ #include<iostream> #include<cstring> #include<vector> #include<cstdio> #include<queue> using namespace std; struct node{ int x, step; node(){ } node(in…
Time limit: 30.000 seconds限时30.000秒 Problem问题 A triangle is a basic shape of planar geometry. It consists of three straight lines and three angles in between. Figure 1 shows how the sides and angles are usually labeled. Figure: Triangle A look into a…
Time limit: 3.000 seconds限时3.000秒 Problem问题 Many researchers are faced with an ever increasing number of journal articles to read and find it difficult to locate papers of relevance to their particular lines of research. However, it is possible to su…
Time limit: 30.000 seconds限时30.000秒 Problem问题 There was once a 3 by 3 by 3 cube built of 27 smaller cubes. It has fallen apart into seven pieces:写曾经有一个3x3x3的立方块,由27个小立方块构成.它被切分为了如下七个碎片: Figure 1: The seven pieces that once formed a cube图1:组成立方体的七块碎片…
Time limit: 3.000 seconds限时3.000秒 Problem问题 In darkest <name of continent/island deleted to prevent offence> lived a tribe called the ``Eeny Meenys''. They got this name from their way of choosing a chief for a year. It appears that a newspaper repo…
Time limit: 3.000 seconds限时3.000秒 Problem问题 Given a graph (V,E) where V is a set of nodes and E is a set of arcs in VxV, and an ordering on the elements in V, then the bandwidth of a node v is defined as the maximum distance in the ordering between v…
Tree You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any leaf. The value of a path is the sum of values of nodes along that path. Input The…
Problem A Ecological Premium Input: standard input Output: standard output Time Limit: 1 second Memory Limit: 32 MB German farmers are given a premium depending on the conditions at their farmyard. Imagine the following simplified regulation: you kno…
Problem B Back to High School Physics Input: standard input Output: standard output A particle has initial velocity and constant acceleration. If its velocity after certain time is v then what will its displacement be in twice of that time? Input The…