
模拟
xieshimao
topcoder
展开
-
USACO gift1
Greedy Gift Givers<br />A group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or might not give some money to any or all of the other friends. Likewise, each friend might or might not receive原创 2011-01-08 14:49:00 · 923 阅读 · 0 评论 -
lintcode 1363. ZigZag Conversion 字符串处理
描述The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S...原创 2018-09-04 12:41:29 · 280 阅读 · 0 评论 -
HDU/HDOJ 4038 2011成都赛区网络赛H题
StoneTime Limit: 3000/2000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 130 Accepted Submission(原创 2011-09-11 19:03:30 · 2380 阅读 · 10 评论 -
POJ 2021 BFS+大量STL。。
Relative RelativesTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 2806 Accepted: 1210<br />DescriptionToday is Ted's 100th birthda原创 2011-03-13 16:17:00 · 1465 阅读 · 0 评论 -
POJ 1016 模拟题
题目连接:http://poj.org/problem?id=1016 题目没什么好说的,就是模拟,可以用string来简化代码。 代码:Source CodeProblem: 1016 User: bingshenMemory: 236K Time: 141MSLanguage原创 2011-07-11 16:33:05 · 1245 阅读 · 0 评论 -
UVA 10196 模拟题。。
<br />题目连接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=13&problem=1137&mosmsg=Submission+received+with+ID+8744125<br />题意很简单,就是判断king有木有被攻击<br />可以直接模拟<br />我的代码:(写的又臭又长。。)<br />#include<stdio.h>#includ原创 2011-04-14 14:38:00 · 905 阅读 · 0 评论 -
POJ 1068 括号模拟
ParencodingsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 11191 Accepted: 6590<br />DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: <br />q By an integer sequence P = p1 p2...pn whe原创 2011-02-10 00:32:00 · 2861 阅读 · 0 评论 -
POJ 2803 字符串识别
Defining MomentTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1341 Accepted: 603<br />DescriptionAs a homework assignment, you have been tasked with creating a program that provides the meanings for many different words. As you dislike the idea原创 2011-01-23 12:29:00 · 1351 阅读 · 0 评论 -
POJ 3298 递推,DP
AntimonotonicityTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 2428 Accepted: 995<br />Description<br />I have a sequence Fred of length n comprised of integers between 1 and n inclusive. The elements of Fred are pairwise distinct. I want to fin原创 2011-01-14 23:55:00 · 1170 阅读 · 0 评论 -
USACO firday 模拟
Friday the Thirteenth<br /><br />Is Friday the 13th really an unusual event? <br />That is, does the 13th of the month land on a Friday less often than on any other day of the week? To answer this question, write a program that will compute the frequency t原创 2011-01-11 17:19:00 · 1138 阅读 · 0 评论 -
USACO ride
Your Ride Is Here<br />It is a well-known fact that behind every good comet is a UFO. These UFOs often come to collect loyal supporters from here on Earth. Unfortunately, they only have room to pick up one group of followers on each trip. They do, however,原创 2011-01-08 14:46:00 · 669 阅读 · 0 评论 -
131. The Skyline Problem 矩形并问题
描述水平面上有 N 座大楼,每座大楼都是矩阵的形状,可以用一个三元组表示 (start, end, height),分别代表其在x轴上的起点,终点和高度。大楼之间从远处看可能会重叠,求出 N 座大楼的外轮廓线。外轮廓线的表示方法为若干三元组,每个三元组包含三个数字 (start, end, height),代表这段轮廓的起始位置,终止位置和高度。请注意合并同样高度的相邻轮廓,不同的...原创 2018-09-06 17:30:53 · 467 阅读 · 0 评论