EricYang

Tech Spot of Eric

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2011年5月13日

摘要: Network SaboteurTime Limit:2000MSMemory Limit:65536KTotal Submissions:5766Accepted:2449DescriptionA university network is composed of N computers. System administrators gathered information on the traffic between nodes, and carefully divided the network into two subnetworks in order to minimize traf 阅读全文
posted @ 2011-05-13 14:42 Eric-Yang 阅读(213) 评论(0) 推荐(0) 编辑

2011年5月9日

摘要: PotsTime Limit:1000MSMemory Limit:65536KTotal Submissions:5062Accepted:2156Special JudgeDescriptionYou are given two pots, having the volume ofAandBliters respectively. The following operations can be performed:FILL(i) fill the poti(1 ≤i≤ 2) from the tap;DROP(i) empty the potito the drain;POUR(i,j) 阅读全文
posted @ 2011-05-09 22:10 Eric-Yang 阅读(308) 评论(0) 推荐(0) 编辑

摘要: Shuffle'm UpTime Limit:1000MSMemory Limit:65536KTotal Submissions:3016Accepted:1381DescriptionA common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips,S1andS2, each stack containingCchips. Each stac 阅读全文
posted @ 2011-05-09 20:43 Eric-Yang 阅读(240) 评论(0) 推荐(0) 编辑

摘要: Prime PathTime Limit:1000MSMemory Limit:65536KTotal Submissions:5585Accepted:3219DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.— It is a matter of security to 阅读全文
posted @ 2011-05-09 19:24 Eric-Yang 阅读(215) 评论(0) 推荐(0) 编辑

2011年5月6日

摘要: #include<iostream>#include<cstdio>using namespace std;int n;long long int q[9999999];void BFS(){ int front,rear; front=rear=0; q[rear]=1; rear++; long long int top; while(rear>front) { top = q[front]; if(top%n==0){ break; } top *= 10; q[rear++]=top; q[rear++]=top+1; front++; } printf( 阅读全文
posted @ 2011-05-06 17:55 Eric-Yang 阅读(218) 评论(0) 推荐(0) 编辑

2011年5月5日

摘要: Catch That CowTime Limit:2000MSMemory Limit:65536KTotal Submissions:22900Accepted:7027DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a pointN(0 ≤N≤ 100,000) on a number line and the cow is at a pointK(0 ≤K≤ 100,000) on the 阅读全文
posted @ 2011-05-05 18:19 Eric-Yang 阅读(326) 评论(0) 推荐(0) 编辑

摘要: Curling 2.0Time Limit:1000MSMemory Limit:65536KTotal Submissions:5175Accepted:2130DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a square mesh is marked. The 阅读全文
posted @ 2011-05-05 17:44 Eric-Yang 阅读(352) 评论(0) 推荐(0) 编辑

摘要: Children of the Candy CornTime Limit:1000MSMemory Limit:65536KTotal Submissions:4901Accepted:2212DescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the maze facing zombies, chainsaw-wielding psychopaths, hippies, and other terrors on t 阅读全文
posted @ 2011-05-05 14:34 Eric-Yang 阅读(438) 评论(0) 推荐(0) 编辑

摘要: 棋盘问题Time Limit:1000MSMemory Limit:10000KTotal Submissions:11037Accepted:5405Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <= n当为-1 -1时表示输入结束。随后的n 阅读全文
posted @ 2011-05-05 12:34 Eric-Yang 阅读(480) 评论(0) 推荐(1) 编辑

摘要: Dungeon MasterTime Limit:1000MSMemory Limit:65536KTotal Submissions:8802Accepted:3431DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south, ea 阅读全文
posted @ 2011-05-05 12:32 Eric-Yang 阅读(368) 评论(1) 推荐(1) 编辑