Archive for the ‘比赛试题’ Category

UVA 140-149

文章来源:http://thunderfyc.wordpress.com.cn/

Bandwidth
 UVA 140

一个图 要求一个点序列 求有边两点间距离的最大值最小的序列

直接暴力

1AC 0.070

Read the rest of this entry »

UVA 130-139

文章来源: http://thunderfyc.wordpress.com.cn/

Roman Roulette
 UVA 130

数K个人 杀掉 再数K个人 走到被杀人的位置上 继续 求从谁开始数 1为幸存者

从1开始数 最后结果轮换之后 可得到从谁开始数

Read the rest of this entry »

UVA 120-129

文章来源: http://thunderfyc.wordpress.com.cn/

Stacks of Flapjacks
 UVA 120

一摞饼大小不同 每次可以选择一个饼一直到顶的饼 全部反过来 要求任意方案使 饼顺序排列

从大到小枚举饼 将要放置的饼移到顶  在转到底

Read the rest of this entry »

UVA 110-119

文章来源: http://thunderfyc.wordpress.com.cn/ 

Meta-Loopless Sorts
 UVA 110

输出Pascal的排序程序

简单递归实现 在第i层时 用判断来枚举 第i个元素的位置

Read the rest of this entry »

UVA Toolkit

UVA toolkit

http://uva.xgd.dk

© 2008 Vain.Thunder’s Blog[CN]
Magic Vision | Design: of . Coding: of .