摘要:j题目链接: http://codeforces.com/contest/913/problem/E 题意: 给你x,y,z三个变量,与& 或| 非! 括号() 四种运算符,规定括号和非优先级最高,其次与&,最后或|。 对于输入的真值表,输出最小字典序的逻辑表达式 挺难想的。关键点在于怎么定义状态并
阅读全文
摘要:题目地址:http://codeforces.com/problemset/problem/55/D 若一个数字n能被它数位上的每一个非零数字整除,称这个数为Beautiful number。 问给定区间[l, r]内有多少个Beautiful numbers。 1≤l≤r≤9*1e18 很明显的数
阅读全文
摘要:有一只猴子随机敲键盘,给出它可能敲的键以及敲各个键的概率。 输入:n,表示有多少个键,m,表示猴子会敲m次键 n个二元组(字母,数字) 表示键代表的字母及其被敲的概率。 最后一个目标字符串。 问这只猴子敲了m次键后得到的字符串包含目标字符串的概率。 最主要的还是怎么定义出具有无后效性的状态。 用dp
阅读全文
摘要:出的超级好的一道题。至于好在哪里,请思考题目: 题意抽象出来为给定一个字符串r,找出它的一个最短后缀s,使得这个r可以被 s的某前缀+s的某前缀+......+s的某前缀+s本身构造出来。 具体题目描述如下: “Be subtle! Be subtle! And use your spies for
阅读全文
摘要:Problem Description Given a binary string S[1,...,N] (i.e. a sequence of 0's and 1's), and Q queries on the string.There are two types of queries:1. F
阅读全文
摘要:The Karting championship will be held on a straight road. There are N keypoints on the road. The path between keypoint i and i+1 has a degree of diffi
阅读全文
摘要:这是现场完整做出来的唯一一道题Orz。。而且还调了很久的bug。还是太弱了。 Problem When you travel, you like to spend time sightseeing in as many cities as possible, but sometimes you mi
阅读全文
摘要:Problem Description Zero has an old printer that doesn't work well sometimes. As it is antique, he still like to use it to print articles. But it is t
阅读全文
摘要:也是校赛学长出的一道题~想穿了很简单。。但我还是听了学长讲才明白。 观察力有待提高。 Problem D: YaoBIG’s extra homeworkTime LimitMemory Limit1 s128 MBDescriptionOne day, a teacher assigned thi
阅读全文