原题连接:http://codeforces.com/contest/586/problem/D 题意: 就大家都玩过地铁奔跑这个游戏(我没玩过),然后给你个当前的地铁的状况,让你判断人是否能够出去. 题解: 就首先预处理一下每个点在哪些时刻会被车子占领,然后从右向左dp一下就好 代码: #include<iostream> #include<cstring> #include<string> #include<vector> #include<alg…
D. Phillip and Trains Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/586/problem/D Description The mobile application store has a new game called "Subway Roller". The protagonist of the game Philip is located in one en…
D. Phillip and Trains time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The mobile application store has a new game called "Subway Roller". The protagonist of the game Philip is located…
水 A - Alena's Schedule /************************************************ * Author :Running_Time * Created Time :2015/10/12 星期一 16:49:42 * File Name :A.cpp ************************************************/ #include <cstdio> #include <algorithm>…
题目链接:http://codeforces.com/contest/283/problem/B 思路: dp[now][flag]表示现在在位置now,flag表示是接下来要做的步骤,然后根据题意记忆化搜索记忆,vis数组标记那些已经访问过的状态. #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #define REP(i, a, b) for (i…
F. Lizard Era: Beginning Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/586/problem/F Description In the game Lizard Era: Beginning the protagonist will travel with three companions: Lynn, Meliana and Worrigan. Overall the…
C. Gennady the Dentist Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/586/problem/C Description Gennady is one of the best child dentists in Berland. Today n children got an appointment with him, they lined up in front of h…
A. Alena's Schedule Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/586/problem/A Description Alena has successfully passed the entrance exams to the university and is now looking forward to start studying. One two-hour less…
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…
原题链接: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];…