Code RefactoringTime Limit:3000msMemory Limit:131072KBThis problem will be judged on UVA. Original ID:1087964-bit integer IO format:%lld Java class na...
分类:
其他好文 时间:
2014-07-16 20:36:39
阅读次数:
175
链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=967描述:要做n双鞋子,第 i 双鞋子要做Ti天,每天消耗Si的钱(当前正在做第 i 双鞋子时不耗钱)...
分类:
其他好文 时间:
2014-07-14 08:26:03
阅读次数:
201
DAY1A UVAlive 3937 painting the sticks给你一些木棒,按照给定的颜色序列染色,每次最多可以染连续的3块(每块的颜色可以不一样),每块可以由任意多个连续木棒组成,求最少步数。题目里有说不允许覆盖染色吗?统计不同的颜色块的个数,除以3并向上取整就是答案了。。B UVa...
分类:
其他好文 时间:
2014-07-14 00:04:32
阅读次数:
249
uva11992:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3143题意:给你n*m的矩阵初始化的时候矩阵里面的元素全部是0,对于这个矩阵有3中操作。1...
分类:
其他好文 时间:
2014-07-13 22:35:03
阅读次数:
286
uva12299:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3720题意:给你n个数,然后有两个操做,shift从左到右一次交换,即a1和a2交换,完了...
分类:
其他好文 时间:
2014-07-13 21:32:18
阅读次数:
261
Parentheses Balance
You are given a string consisting of parentheses () and []. A string of this type is said to be correct:
(a)if it is the empty string(b)if A and B are correct, AB is c...
分类:
其他好文 时间:
2014-07-13 15:42:59
阅读次数:
207
题目链接:uva 11825题意:你是一个黑客,侵入了n台计算机(每台计算机有同样的n种服务),对每台计算机,你能够选择终止一项服务,则他与其相邻的这项服务都终止。你的目标是让很多其它的服务瘫痪(没有计算机有该项服务)。思路:(见大白70页,我的方程与大白不同)把n个集合P1、P2、Pn分成尽量多的...
分类:
其他好文 时间:
2014-07-13 11:07:49
阅读次数:
182
n个城市通过m条无向边连接,回答q个询问,每个询问形式为s,t,要找到一条s到t的路使得这条路上的最大危险系数最小。还是最小瓶颈路,可是要快速回答每次询问,先求出最小生成树,转化为有根树,即找到s到t的路径上的最大边,在这一过程中倍增查找。预处理的复杂度为nlogn,每次查询为logn。#inclu...
分类:
其他好文 时间:
2014-07-13 09:56:45
阅读次数:
213
题目:手里有五张牌,桌上有一堆牌(五张),你可以弃掉手中的k(0
比较规则如下:(按优先级排序)
1.straight-flush:同花顺,牌面为T(10) - A,这里不论花色是否相同;
2.four-of-a-kind:四条,牌面有4个相同的值;
3.full-house:船牌,牌面有3个相...
分类:
其他好文 时间:
2014-07-12 19:17:34
阅读次数:
151
Description
Magic Numbers
Write a program that finds and displays all pairs ofintegers and
such that:
neither nor
have any digits repeated; and , where
N is a given i...
分类:
其他好文 时间:
2014-07-10 20:10:06
阅读次数:
238