题意:要用一个有序的序列生成给定序列,操作有两种,一是交换前两个元素,二是把第一个元素移动到最后去。思路有两种:1.映射,把给定序列映射成有序的序列,然后按照同样的替换规则把有序的序列映射掉,然后就可以排序啦。具体解释可以看SRM 664的C题2.逆向思考,把给定序列变成有序,操作相应变化一下,最后...
分类:
其他好文 时间:
2015-08-04 00:31:48
阅读次数:
219
Problem Statement
Bear Limak was chilling in the forest when he suddenly found a computer program. The program was a correct implementation of MergeSort. Below you can find the program in ...
分类:
编程语言 时间:
2015-08-02 21:45:31
阅读次数:
181
A题,熊孩子测视力,水题,题意就是判断一下两个数对应位不相同的数字有多少个。#includeusing namespace std;class BearCheats{ public: string eyesight(int A, int B){ int d...
分类:
其他好文 时间:
2015-08-02 11:26:07
阅读次数:
125
BearPlaysDiv2Problem StatementLimak is a little bear who loves to play. Today he is playing by moving some stones between three piles of stones. Initi...
分类:
其他好文 时间:
2015-08-02 06:21:20
阅读次数:
141
#include#include#include#includeusing namespace std;class BearCheats{public: string eyesight(int A, int B){ char t[256]; string s1; ...
分类:
其他好文 时间:
2015-08-02 00:55:05
阅读次数:
141
Problem Statement
Bob is going to create a graph with N nodes. The graph will be constructed in two steps. First, Bob will take N isolated vertices, label them 1 through N and color each of them us...
分类:
其他好文 时间:
2015-07-26 22:44:29
阅读次数:
261
the value A = lcm(N+1, N+2, ..., M) and the value B = lcm(1, 2, ..., M). She was surprised when she saw that A = B....
分类:
其他好文 时间:
2015-07-26 22:39:17
阅读次数:
172
SRM 661-Medium: BridgeBuildingDiv2
Problem Statement
You have two rows of nodes. Each row contains N nodes, numbered 0 through N-1 from the left to the right.
Within each row, adjacent nodes...
分类:
其他好文 时间:
2015-07-26 00:35:52
阅读次数:
290
1. 算法1.1 SRM钱少($30左右),而且很难。1.2 Tournament钱多($1000~$10000),太难~1.3TCHS题目和SRM一样,仅限中学生参加,参赛者水平较低,据说涨rating很容易1.4 Marathons我倒是感觉有些方法是必知的,例如SA,greedy,dp,dfs...
分类:
其他好文 时间:
2015-07-25 16:43:33
阅读次数:
127
AABBTime Limit: 20 SecMemory Limit: 256 MB题目连接TCDescriptionOne day, Jamie noticed that many English words only use the letters A and B. Examples of su...
分类:
其他好文 时间:
2015-07-24 06:44:17
阅读次数:
185