随笔分类 -  ACM题解

上一页 1 2 3 4 5 6 7 8 下一页

Just a Hook(线段树,成段更新)
摘要:Just a HookTime Limit : 4000/2000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 7Accepted Submission(s) : 4Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive me 阅读全文

posted @ 2013-02-25 17:21 铁树银花 阅读(274) 评论(0) 推荐(0) 编辑

Codeforces Round #167 (Div. 2) B. Dima and Sequence(暴力)
摘要:B. Dima and Sequencetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDima got into number sequences. Now he's got sequence a1, a2, ..., an, consisting of n positive integers. Also, Dima has got a function f(x), which can be defined with the fo 阅读全文

posted @ 2013-02-25 11:51 铁树银花 阅读(249) 评论(0) 推荐(0) 编辑

Codeforces Round #167 (Div. 2) A. Dima and Friends (模拟,简单)
摘要:A. Dima and Friendstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDima and his friends have been playing hide and seek at Dima's place all night. As a result, Dima's place got messy. In the morning they decided that they need to clean th 阅读全文

posted @ 2013-02-24 21:14 铁树银花 阅读(354) 评论(0) 推荐(0) 编辑

Codeforces Round #168 (Div. 2)D. Zero Tree(DP,中等难度)
摘要:D. Zero Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tree is a graph with n vertices and exactly n - 1 edges; this graph should meet the following condition: there exists exactly one shortest (by number of edges) path between any pair of 阅读全文

posted @ 2013-02-24 11:46 铁树银花 阅读(515) 评论(0) 推荐(0) 编辑

Codeforces Round #168 (Div. 2) C. k-Multiple Free Set(二分查找)
摘要:C. k-Multiple Free Settime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA k-multiple free set is a set of integers where there is no pair of integers where one is equal to another integer multiplied by k. That is, there are no two integers x and y 阅读全文

posted @ 2013-02-23 09:39 铁树银花 阅读(630) 评论(0) 推荐(0) 编辑

Codeforces Round #168 (Div. 2) B. Convex Shape(暴力)
摘要:B. Convex Shapetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputConsider an n × m grid. Initially all the cells of the grid are colored white. Lenny has painted some of the cells (at least one) black. We call a painted grid convex if one can 阅读全文

posted @ 2013-02-22 15:15 铁树银花 阅读(364) 评论(0) 推荐(0) 编辑

Codeforces Round #168 (Div. 2) A. Lights Out(模拟)
摘要:A. Lights Outtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLenny is playing a game on a 3 × 3 grid of lights. In the beginning of the game all lights are switched on. Pressing any of the lights will toggle it and all side-adjacent lights. 阅读全文

posted @ 2013-02-22 11:04 铁树银花 阅读(437) 评论(0) 推荐(0) 编辑

Codeforces Round #166 (Div. 2)D. Good Substrings(字符串散列)
摘要:D. Good Substringstime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou've got string s, consisting of small English letters. Some of the English letters are good, the rest are bad.A substring s[l...r] (1 ≤ l ≤ r ≤ |s|) of string s = s1s2...s|s 阅读全文

posted @ 2013-02-21 23:57 铁树银花 阅读(398) 评论(0) 推荐(0) 编辑

Codeforces Round #166 (Div. 2)C. Secret(构造)
摘要:C. Secrettime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Greatest Secret Ever consists of n words, indexed by positive integers from 1 to n. The secret needs dividing between k Keepers (let's index them by positive integers from 1 to k), 阅读全文

posted @ 2013-02-18 13:39 铁树银花 阅读(258) 评论(0) 推荐(0) 编辑

Codeforces Round #166 (Div. 2) B. Prime Matrix(素数筛选,简单)
摘要:B. Prime Matrixtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got an n × m matrix. The matrix consists of integers. In one move, you can apply a single transformation to the matrix: choose an arbitrary element of the matrix and i 阅读全文

posted @ 2013-02-17 21:47 铁树银花 阅读(338) 评论(0) 推荐(0) 编辑

Codeforces Round #166 (Div. 2) A. Beautiful Year(水题)
摘要:A. Beautiful Yeartime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt seems like the year of 2013 came only yesterday. Do you know a curious fact? The year of 2013 is the first year after the old 1987 with only distinct digits.Now you are suggested 阅读全文

posted @ 2013-02-17 19:54 铁树银花 阅读(660) 评论(0) 推荐(0) 编辑

Somali Pirates(水题)
摘要:Somali PiratesTime Limit: 1 Second Memory Limit: 32768 KBIt is said that the famous Somali Pirates hate digits. So their QQ passwords never contain any digit. Given some lines of candidate passwords, you are asked to delete all the digits in the passwords and print other characters in their origi... 阅读全文

posted @ 2013-02-15 16:29 铁树银花 阅读(447) 评论(0) 推荐(0) 编辑

Who is Older?(水题)
摘要:Who is Older?Time Limit: 1 Second Memory Limit: 32768 KBJavaman and cpcs are arguing who is older. Write a program to help them.InputThere are multiple test cases. The first line of input is an integer T (0 < T <= 1000) indicating the number of test cases. Then T test cases follow. The i-th li 阅读全文

posted @ 2013-02-15 16:17 铁树银花 阅读(638) 评论(0) 推荐(0) 编辑

Compromise(求解最长公共子序列并输出)
摘要:CompromiseTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5181Accepted: 2361Special JudgeDescriptionIn a few months the European Currency Union will become a reality. However, to join the club, the Maastricht criteria must be fulfilled, and this is not a trivial task for the countries (mayb 阅读全文

posted @ 2013-02-15 13:41 铁树银花 阅读(265) 评论(0) 推荐(0) 编辑

Strange Towers of Hanoi(DP,汉诺塔)
摘要:Strange Towers of HanoiTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 2195Accepted: 1446DescriptionBackground Charlie Darkbrown sits in another one of those boring Computer Science lessons: At the moment the teacher just explains the standard Tower of Hanoi problem, which bores Charlie to 阅读全文

posted @ 2013-02-14 23:38 铁树银花 阅读(672) 评论(0) 推荐(0) 编辑

World Cup Noise(DP基础)
摘要:World Cup NoiseTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 13853Accepted: 6827DescriptionBackground "KO-RE-A, KO-RE-A" shout 54.000 happy football fans after their team has reached the semifinals of the FIFA World Cup in their home country. But although their excitement is rea 阅读全文

posted @ 2013-02-14 17:35 铁树银花 阅读(571) 评论(0) 推荐(0) 编辑

Recaman's Sequence(简单)
摘要:Recaman's SequenceTime Limit: 3000MS Memory Limit: 60000KTotal Submissions: 19147 Accepted: 8028DescriptionThe Recaman's sequence is defined by a0 = 0 ; for m > 0, am = am−1 − m if the rsulting am is positive and not already in the sequence, otherwise am = am−1 + m. The first few numbers 阅读全文

posted @ 2013-02-14 11:16 铁树银花 阅读(425) 评论(0) 推荐(0) 编辑

Function Run Fun(简单)
摘要:Function Run FunTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 13734Accepted: 7154DescriptionWe all love recursion! Don't we? Consider a three-parameter recursive function w(a, b, c):if a <= 0 or b <= 0 or c <= 0, then w(a, b, c) returns:1if a > 20 or b > 20 or c > 20 阅读全文

posted @ 2013-02-13 23:49 铁树银花 阅读(1731) 评论(0) 推荐(0) 编辑

The Triangle(DP基础)
摘要:The TriangleTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 31614Accepted: 18667Description73 88 1 02 7 4 44 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that starts at the top and ends so... 阅读全文

posted @ 2013-02-13 22:27 铁树银花 阅读(324) 评论(0) 推荐(0) 编辑

Safecracker(暴力)
摘要:SafecrackerTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5240Accepted Submission(s): 2622Problem Description=== Op tech briefing, 2002/11/02 06:42 CST === "The item is locked in a Klein safe behind a painting in the second-floor library. Kle 阅读全文

posted @ 2013-02-07 00:17 铁树银花 阅读(1443) 评论(0) 推荐(1) 编辑

上一页 1 2 3 4 5 6 7 8 下一页

导航