原文地址:http://adolgarev.blogspot.com/2013/12/lets-do-our-own-full-blown-http-server.html Sometimes servlets just doesn't fit you, sometimes you need to support some protocols except HTTP, sometimes you need something really fast. Allow me to show you t…
B. Blown Garland time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Nothing is eternal in the world, Kostya understood it on the 7-th of January when he saw partially dead four-color garland.…
B. Blown Garland time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Nothing is eternal in the world, Kostya understood it on the 7-th of January when he saw partially dead four-color garland.…
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output   Nothing is eternal in the world, Kostya understood it on the 7-th of January when he saw partially dead four-color garland. Now he has a go…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Nothing is eternal in the world, Kostya understood it on the 7-th of January when he saw partially dead four-color garland. Now he has a goal to…
题目链接:http://codeforces.com/contest/758/problem/B 题意:一个原先为4色环的链子少了部分,要你找出死的最少的一种可能,各输出四种颜色的死了多少. 分析:就是要找出这个链子是那个部分.那么就有4!种可能. #include <bits/stdc++.h> using namespace std; ][] = { "BGRY", "BGYR", "BRGY", "BRYG"…
http://codeforces.com/problemset/problem/758/B 题意:给出一个字符串,每4个位置对应一个颜色,如果为‘!’的话,代表该灯泡是坏的,问最后每个颜色坏的灯泡的数目. 思路:题意实在挺难懂的(可能我到现在还没看懂).看样例看了好久才看出来.例如最后一个样例“!GB!RG!Y!”:可以拆分成"!GB!”,"RG!Y","!",R只在第一个位置出现,说明R是在第一个位置的,以此类推,G是在第二个位置,B是在第三个位置,Y…
题意:输入是由连续的RYGB和字符!组成的字符串,R代表红灯,Y代表黄灯,G代表绿灯,B代表蓝灯.简而言之,就是给定的字符串保证了下标对4取余相同的灯颜色都相同,但是有的地方为‘!’代表这个灯坏了,然后分别输出坏了的红.蓝.黄.绿灯的数量. 分析:因为下标对4取余相同的灯颜色都相同,所以确定了前四个灯的颜色,后面的灯都是前四个灯颜色的不断循环,两个map映射一下就可以了. #include<bits/stdc++.h> #define Min(a, b) ((a < b) ? a : b…
AUTO-COMPLETE/AUTO-SUGGEST Auto-complete using Vaadin Offer auto-suggest or auto-complete to help your users increase efficiency and reduce errors. You can even create a grouped and formatted set of suggestionslike Apple does. CAROUSEL/COVERFLOW Caro…
001 Love your neighbor as yourself.         要爱人如己.--<旧·利>19:18      002 Resentment kills a fool, and envy slays the simple.         忿怒害死愚妄人,嫉妒杀死痴迷人.--<旧·伯>5:2 003 Does a wild donkey bray when it has grass, or an ox bellow when it has fodder?  …