2770: PKU2503 Babelfish Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 2  Solved: 2[Submit][Status][Web Board] Description You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialectof a foreign language. Fortun…
2774: Poi2000 病毒 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 5  Solved: 4[Submit][Status][Web Board] Description 二进制病毒审查委员会最近发现了如下的规律:某些确定的二进制串是病毒的代码.如果某段代码中不存在任何一段病毒代码,那么我们就称这段代码是安全的.现在委员会已经找出了所有的病毒代码段试问,是否存在一个无限长的安全的二进制代码.示例:例如如果{011, 11, 00000}…
2768: Zju1290 Word-Search Wonder Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 4  Solved: 2[Submit][Status][Web Board] Description The Pyrates Restaurant was starting to fill up as Valentine McKee walked in. She scanned the crowd for her sister, bro…
近期做东西,用到了对SQLServer数据库的操作.好吧,确实好久没看了,对这个数据库陌生到了极点,连最简单的如何设置一个id主键,让它随着插入数据的增多,自动增长id值的设置都忘记了,网上查了一下,好多人都说使用代码,好像跟我要的不一样,然后在百度知道找到了答案,虽然有点不好意思,但还是贴出来吧: 问:如何手动设置SQLServer的id(主键),让它随着插入的数据自动增长? 答:点击需要设置的表,点击右键——设计——在列中,点击id——下方出现如下的图: 自增定义: 然后点击确定即可!!!!…
Problem A: Jolly Jumpers Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 10  Solved: 4[Submit][Status][Web Board] Description A sequence of n > 0 integers is called a jolly jumper if the absolute values of the differences between successive elements ta…
Problem C: The Trip Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 19  Solved: 3[Submit][Status][Web Board] Description The Trip A group of students are members of a club that travels annually to different locations. Their destinations in the past hav…
Easy Problem from Rujia Liu? Though Rujia Liu usually sets hard problems for contests (for example, regional contests like Xi'an 2006, Beijing 2007 and Wuhan 2009, or UVa OJ contests like Rujia Liu's Presents 1 and 2), he occasionally sets easy probl…
[题目链接] http://codeforces.com/problemset/problem/713/C [题目大意] 给出一个数列,请你经过调整使得其成为严格单调递增的数列,调整就是给某些位置加上或者减去某个数,调整的代价是加上或者减去的数的绝对值之和,请你输出最小代价. [题解] 先考虑这样一个问题,如果是非严格单调递增该如何做,我们会发现每次调整,都是调整某个数字为原先数列中存在的数字,最后才是最优的,所以,我们设DP[i][j]表示前i个数字,最后一个数为原先数列排序后第j大的数字的最…
题目链接:http://acm.fzu.edu.cn/problem.php?pid=2232 Description GG学长虽然并不打炉石传说,但是由于题面需要他便学会了打炉石传说.但是传统的炉石传说对于刚入门的GG学长来说有点复杂,所以他决定自己开发一个简化版的炉石传说. 在简化版的炉石传说中: 每个随从只有生命值和攻击力,并且在你的回合下,你的每只随从在本回合下只能选择一个敌方随从进行攻击.当两个随从a,b交战时,a的生命值将减去b的攻击力,b的生命值将减去a的攻击力,(两个伤害没有先后…
/** * SnowFlake ID Generator * Based on Twitter Snowflake to generate unique ID across multiple * datacenters and databases without having duplicates. * * * SnowFlake Layout * * 1 sign bit -- 0 is positive, 1 is negative * 41 bits -- milliseconds sin…