G.易彰彪的一张表
摘要:易彰彪最近有点奇怪,一向爱打游戏他最近居然盯着一张全是大小写字母的表在看,好像在找什么东西。他说,这是他女神给他的一张表,他需要回答女神的问题——在忽略大小写(即大写字母和小写字母视为同一字母)的情况下,是否能在表中找到某一连续的字符串(第 ii 行的尾部和第 i + 1i+1 行的头部视为相连)。
阅读全文
posted @
2016-04-24 17:53
Beserious
阅读(402)
推荐(0) 编辑
C.Candy
摘要:There are NN children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following r
阅读全文
posted @
2016-04-24 17:33
Beserious
阅读(361)
推荐(0) 编辑
B.大钉骑马走江湖
摘要:江湖是什么,对于在象棋界厮杀的大钉来说,江湖就是一个矩阵,他的目标,就是在江湖之中骑着马,从他的位置出发,走到终点。 当然,大钉的马也遵从中国象棋中的“马走日”的规则,而且在矩阵中,也会有一些障碍物,马不能跳到障碍物上;如果大钉的马面前有障碍物,即被“别马腿”,那么他将不能跳向有障碍物的左前和右前这
阅读全文
posted @
2016-04-24 15:56
Beserious
阅读(379)
推荐(0) 编辑
A喝酒(北京林业大学校赛)
摘要:http://www.jisuanke.com/contest/1410 王大钉喜欢喝酒,存货都喝完了,他就去楼下买,正好楼下的商店为了响应学校的 ACM 校赛推出了优惠活动:凡是在本店买的啤酒,喝完以后 33 个空瓶可以换一瓶,44 个瓶盖也可以换一瓶酒。 王大钉觉得太合算了,决定多买,现在他手里
阅读全文
posted @
2016-04-24 15:11
Beserious
阅读(276)
推荐(0) 编辑
HDU 5666 Segment
摘要:Segment Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1082 Accepted Submission(s): 398 Problem
阅读全文
posted @
2016-04-22 18:42
Beserious
阅读(136)
推荐(0) 编辑
南京理工大学第八届校赛题目题解(部分)
摘要:https://icpc.njust.edu.cn/Contest/749/rank/、 a偷吃糖果 思路:读入的时候相同的字母合并成一个字母。最后比较一下。 /* *********************************************** Author :guanjun Cre
阅读全文
posted @
2016-04-18 12:00
Beserious
阅读(305)
推荐(0) 编辑
TCO 2016 Round 1B
摘要:problem 250 Problem Statement Vasa likes to construct sequences of numbers. If you tell him a positive integer n, he will begin a new sequence by writ
阅读全文
posted @
2016-04-13 19:17
Beserious
阅读(461)
推荐(0) 编辑
139. Word Break
摘要:Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For
阅读全文
posted @
2016-04-05 18:25
Beserious
阅读(241)
推荐(0) 编辑
90. Subsets II
摘要:Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: Elements in a subset must be in non-descending
阅读全文
posted @
2016-04-05 18:23
Beserious
阅读(126)
推荐(0) 编辑
78. Subsets
摘要:Given a set of distinct integers, nums, return all possible subsets. Note: Elements in a subset must be in non-descending order. The solution set must
阅读全文
posted @
2016-04-05 18:22
Beserious
阅读(171)
推荐(0) 编辑
77. Combinations
摘要:Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example,If n = 4 and k = 2, a solution is:
阅读全文
posted @
2016-04-05 18:21
Beserious
阅读(138)
推荐(0) 编辑
40. Combination Sum II
摘要:Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each num
阅读全文
posted @
2016-04-05 16:55
Beserious
阅读(157)
推荐(0) 编辑
39. Combination Sum
摘要:Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeat
阅读全文
posted @
2016-04-05 16:52
Beserious
阅读(194)
推荐(0) 编辑
22. Generate Parentheses
摘要:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "
阅读全文
posted @
2016-04-05 16:49
Beserious
阅读(193)
推荐(0) 编辑
51. N-Queens
摘要:The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all
阅读全文
posted @
2016-04-03 13:02
Beserious
阅读(176)
推荐(0) 编辑
Codeforces Round #346 (Div. 2) E. New Reform
摘要:E. New Reform time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Berland has n cities connec
阅读全文
posted @
2016-04-02 18:55
Beserious
阅读(231)
推荐(0) 编辑
Codeforces Round #346 (Div. 2) D. Bicycle Race
摘要:D. Bicycle Race time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Maria participates in a b
阅读全文
posted @
2016-04-02 18:51
Beserious
阅读(229)
推荐(0) 编辑