摘要:
斌神无所不能Description 如果你以为斌神只会ACM?come on,斌神是无所不能的!其实,在2012/11/11这天之后,斌神就已经是亿万富翁了,为什么呢?因为他在天猫上开了个网店大卖了一种商品——2012世界末日诺亚方舟船票!因为诺亚方舟是斌神造的,所以斌神垄断了这种商品。以前一直生意不好,没想到光棍节那天订单络绎不绝,卡爆了天猫。但是,这种情况斌神夜观天象的时候已经预测出了,所以他一边限制一次性购买数量,一边却制定了下面的策略:1.如果订单时间为00:00:00 ~ 05:59:59,那么原价卖出2.如果订单时间为06:00:00 ~ 17:59:59,那么按原价10倍卖出3. 阅读全文
摘要:
Vigenere密码 Time Limit: 1 Sec Memory Limit: 16MDescriptionVigenere密码是基于关键词的加密系统。关键词写在明文的下面(或上面),并不断重复书写,形成密钥流;使得每个明文字母都与一个关键字的字母关联。例如:明文:this is the plaintext ,关键词:hold。加密过程为相应位置字母的和(mod 26)。Input输入包含T组测试数据,T<100。对于每组测试数据,第1行包含一个正整数N (1<=N<=100000),接下来的一行是长度为N的明文字符串,第3行包含一个正整数M(1<M<N), 阅读全文
摘要:
2095 find your present (2)Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them will be yours.Each present has a card number on it, and your presen 阅读全文
摘要:
Problem DescriptionIn 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n) to be n plus the sum of the digits of n. (The d stands for digitadition, a term coined by Kaprekar.) For example, d(75) = 75 + 7 + 5 = 87. Give 阅读全文
摘要:
Problem DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs. Consider the following algor 阅读全文