好长一段时间没写博客了,实在是想不出有什么好写的.近期也有对自己的职业做了一点思考,还是整理不出个所以然来,很是烦躁 ... 研究TopCoder已经有一小段时间了,都是在做之前的题目,还没有实际参加过比赛.以后应该会开设一个topcoder的分类专门写一些里面的一些题目,就当做笔记来写 ... 比较喜欢这种解题的方式,有一些题目还是很有挑战性的,这次先贴出一题做一下暖身.(SRM 594 DIV 2) 1.这是道250分的题,原题是: Fox Ciel is now in high schoo…
Problem Statement Charlie has N pancakes. He wants to serve some of them for breakfast. We will number the pancakes 0 through N-1. For each i, pancake i has width i+1 and deliciousness d[i].Charlie chooses the pancakes he is going to serve using t…
body { font-family: Monospaced; font-size: 12pt } pre { font-family: Monospaced; font-size: 12pt } Problem Statement You have an array with N elements. Initially, each element is 0. You can perform the following operations: Increment operation:…
Problem Statement Recently, Alice had to take a test. The test consisted of a sequence of true/false questions. Alice was completely unprepared for the test, so she just guessed each answer. You are given the following inputs: an int questions: the n…
题意 [题目链接]这怎么发链接啊..... Sol 枚举一个断点,然后类似于LIS一样dp一波 这个边界条件有点迷啊..fst了两遍... #include<bits/stdc++.h> using namespace std; const int MAXN = 1e5 + 10, INF = 1e9 + 7; inline int read() { char c = getchar(); int x = 0, f = 1; while(c < '0' || c > '9') {i…
TopCoder入门 http://acmicpc.info/archives/164?tdsourcetag=s_pctim_aiomsg 本文根据经典的TC教程完善和改编.TopCoder:http://www.topcoder.com/ 基本规则TopCoder的比赛类型很多,最常见的是周赛SRM(Single Round Match),另外还有TCHS SRM(TopCoder High School SRM,题目和SRM一样,仅限中学生参加,参赛者水平较低,据说涨rating很容易),…
A . 250 Problem Statement Some people are sitting in a row. Each person came here from some country. You have a theory that people from the same country are all sitting together. You decided to test this theory. You asked each person the same qu…
开始接触Topcode..div2.. 250题目: Problem Statement You are given a String s consisting of lower to , respectively. We will denote the value assigned to the letter X by val[X]. For example, val[ and val[. We define the value of the string s as follows.…
周赛时遇到的一道比较有意思的题目: Problem Statement There are N rooms in Maki's new house. The rooms are numbered from 0 to N-1. Some pairs of rooms are connected by bidirectional passages. The passages have the topology of a tree. That is, there are exactly N-…
第一次做TC,不太习惯,各种调试,只做了一题...... Problem Statement Fox Ciel is going to play Gomoku with her friend Fox Jiro. Ciel plays better, so before they start she allowed Jiro to put some of his pieces on the board. You are given a vector <string> board tha…