原题链接:http://codeforces.com/contest/586/problem/B 题意: 大概就是给你一个两行的路,让你寻找一个来回的最短路,并且不能走重复的路. 题解: 就枚举上下选的是哪条路来跨过主干道就好 代码: #include<iostream> #include<cstring> #include<vector> #define MAX_N 55 using namespace std; int n; ][MAX_N]; ][MAX_N];…
原题链接:http://codeforces.com/contest/586/problem/A 题意: 大概就是给你个序列..瞎比让你统计统计什么长度 题解: 就瞎比搞搞就好 代码: #include<iostream> #include<cstring> #include<vector> #include<algorithm> #define MAX_N 123 using namespace std; int n; int a[MAX_N]; int…
Bakery 题目链接: http://codeforces.com/contest/707/problem/B Description Masha wants to open her own bakery and bake muffins in one of the n cities numbered from 1 to n. There are m bidirectional roads, each of whose connects some pair of cities. To bake…
B. Laurenty and Shop Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/586/problem/B Description A little boy Laurenty has been playing his favourite game Nota for quite a while and is now very hungry. The boy wants to make sa…
                                                                             B. Laurenty and Shop   A little boy Laurenty has been playing his favourite game Nota for quite a while and is now very hungry. The boy wants to make sausage and cheese sand…
B. Laurenty and Shoptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA little boy Laurenty has been playing his favourite game Nota for quite a while and is now very hungry. The boy wants to make sa…
B. Laurenty and Shop time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A little boy Laurenty has been playing his favourite game Nota for quite a while and is now very hungry. The boy wants t…
水 A - Alena's Schedule /************************************************ * Author :Running_Time * Created Time :2015/10/12 星期一 16:49:42 * File Name :A.cpp ************************************************/ #include <cstdio> #include <algorithm>…
A. Watching a movie time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have decided to watch the best moments of some movie. There are two buttons on your player: Watch the current minute…
A. Contest time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Misha and Vasya participated in a Codeforces contest. Unfortunately, each of them solved only one problem, though successfully sub…