Tournament Chart 传送门:链接  来源:UPC10889 题目描述 In 21XX, an annual programming contest, Japan Algorithmist GrandPrix (JAG) has become one of the most popular mind sports events. JAG is conducted as a knockout tournament. This year, N contestants will compe…
编程题常用知识点的review. most important: 想好(1)详尽步骤(2)边界特例,再开始写代码. I.vector #include <iostream> //0.头文件. 特性: 连续存储,动态双倍分配增长 #include <vector> #include <algorithm> //relevant using namespace std; bool comp(int a,int b){ return a>b; } int main(){…
题目:http://poj.org/problem?id=3096 题意:给定一个字符串S,从中找出所有有两个字符组成的子串,每当组成子串的字符之间隔着n字符时,如果没有相同的子串出现,则输出 "S is surprising." , 反之,则输出 "S is NOT surprising." . 例如 AABA 把它分成两个字符为一个整体的,1..相邻两个字符 AA,AB,BA 没有相同的;    2.隔一个字符的 AB AA 没有相同;          3.隔…
Email AliasesCrawling in process... Crawling failed Time Limit:2000MS     Memory Limit:524288KB     64bit IO Format:%I64d & %I64u Submit Status Description   Input   Output   Sample Input   Sample Output   Hint   Description Polycarp has quite recent…
Shuffle'm Up Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14471 Accepted: 6633 Description A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of po…
题目 Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who comes for a query. Input Specification: Each input fi…
http://blog.csdn.net/alex_xhl/article/details/37692297 List封装了链表,Vector封装了数组, list和vector得最主要的区别在于vector使用连续内存存储的,他支持[]运算符,而list是以链表形式实现的,不支持[]. Vector对于随机访问的速度很快,但是对于插入尤其是在头部插入元素速度很慢,在尾部插入速度很快.List对于随机访问速度慢得多,因为可能要遍历整个链表才能做到,但是对于插入就快的多了,不需要拷贝和移动数据,只…
题意:一大堆单词中间有空格隔开,以'#'结束输出,问只出现一次的的单词有哪些(如果两个具有相同的长度,相同的字母也算是相同的,不区分大小写,如:noel和lone属于一个单词出现两次).最后按照字典序输出那些只出现一次的单词 #include <stdio.h> #include <string.h> #include <iostream> #include <algorithm> #include <math.h> #include <l…
List封装了链表,Vector封装了数组, list和vector得最主要的区别在于vector使用连续内存存储的,他支持[]运算符,而list是以链表形式实现的,不支持[]. Vector对于随机访问的速度很快,但是对于插入尤其是在头部插入元素速度很慢,在尾部插入速度很快.List对于随机访问速度慢得多,因为可能要遍历整个链表才能做到,但是对于插入就快的多了,不需要拷贝和移动数据,只需要改变指针的指向就可以了.另外对于新添加的元素,Vector有一套算法,而List可以任意加入.Map,Se…
Tournament Chart 题目描述 In 21XX, an annual programming contest, Japan Algorithmist GrandPrix (JAG) has become one of the most popular mind sports events. JAG is conducted as a knockout tournament. This year, N contestants will compete in JAG. A tournam…