UVa OJ 180 - Eeny Meeny】的更多相关文章

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…
Eeny Meeny Moo Time Limit: 1000ms Memory Limit: 65535KB                     大家都有这种经验,当太多的人同时使用互联网的时候,网络会变得非常,非常缓慢.为了结决这一问题,北师大制定了一项应急计划,在网络使用高峰期切断一些连接以保证网络的畅通.所有的网络连接都将被标号(从1开始,依次是2号,3号……).当应急计划启动的时候,首先切断1号连接,然后切断1号之后的第M个连接,在然后是上一个被切断之后的第M个连接,以此类推.例如…
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:组成立方体的七块碎片…
/* 一张有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: 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…