
uva
纯纯的心儿
每天都在赚事业。。
展开
-
UVA146 ID Codes
ID Codes It is 2084 and the year of Big Brother has finally arrived, albeit a century late. In order to exercise greater control over its citizens and thereby to counter a chronic breakdown in law an原创 2015-03-23 21:56:05 · 509 阅读 · 0 评论 -
UVA 10474 Where is the Marble?(
UVA 10474 Where is the Marble? 这题的题意就是找到第几小的,注意数组的范围; #include #include int com(const void *a1,const void *a2) { return *(int *)a1-*(int *)a2; } int main() { int n,m; int i,j,k=1; int s[20000];原创 2015-03-23 22:13:02 · 405 阅读 · 0 评论 -
uva216 Getting in Line
此题主要是把电脑连起来,但是其中还得加16,求最短的缆线长 直接暴力求解 #include #include #include #include using namespace std; double changdu(double x1,double y1,double x2,double y2) { double l=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)原创 2015-03-23 22:27:38 · 435 阅读 · 0 评论 -
UVA 639 Don't Get Rooked
#include #include int n; int max; int i,j; char s[5][5];//定义城市地图; int youwu(int x,int y)//查看是否有无碉堡; { int i,j; for(i=x-1;i>=0;i--) { if(s[i][y]=='X') break; else if(s[i][y]=='O') return fal原创 2015-03-23 22:31:41 · 535 阅读 · 0 评论 -
UVa514 Rails
题目:铁轨 题目链接: UVa514链接 题目描述: 某城市有一个火车站,有n节车厢从A方向驶入车站,按进站的顺序编号为1-n.你的任务是判断是否能让它们按照某种特定的顺序进入B方向的铁轨并驶入车站。例如,出栈顺序(5 4 1 2 3)是不可能的,但是(5 4 3 2 1)是可能的。 输入n 代表n节车厢,输入一列序,输出是否可以这样的出站; 分析:这题是一道关翻译 2015-03-24 12:34:14 · 675 阅读 · 0 评论 -
UVA12510 Collecting Coins
In a maze of r rows and c columns, your task is to collect as many coins as possible. Each square is either your start point "S"(which will become empty after you leave), an empty square ".", a coin原创 2015-04-06 23:22:26 · 615 阅读 · 0 评论