D. Image Preview 题目连接: http://www.codeforces.com/contest/651/problem/D Description Vasya's telephone contains n photos. Photo number 1 is currently opened on the phone. It is allowed to move left and right to the adjacent photo by swiping finger over…
Vasya's telephone contains n photos. Photo number 1 is currently opened on the phone. It is allowed to move left and right to the adjacent photo by swiping finger over the screen. If you swipe left from the first photo, you reach photo n. Similarly,…
cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅..... 其实这个应该是昨天就写完的,不过没时间了,就留到了今天.. 地址:http://codeforces.com/contest/651/problem/A A. Joysticks time limit per test 1 second memory limit per test 256…
DFS A - Joysticks 嫌麻烦直接DFS暴搜吧,有坑点是当前电量<=1就不能再掉电,直接结束. #include <bits/stdc++.h> typedef long long ll; const int N = 1e5 + 5; int ans = 0; void DFS(int a, int b, int step) { if (a <= 0 || b <= 0) { ans = std::max (ans, step); return ; } if (a…
A. Joysticks time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Friends are going to play console. They have two joysticks and only one charger for them. Initially first joystick is charged at…
题目链接: http://codeforces.com/problemset/problem/650/C C. Table Compression time limit per test4 secondsmemory limit per test256 megabytes 问题描述 Little Petya is now fond of data compression algorithms. He has already studied gz, bz, zip algorithms and m…
E. Clockwork Bomb 题目连接: http://www.codeforces.com/contest/650/problem/E Description My name is James diGriz, I'm the most clever robber and treasure hunter in the whole galaxy. There are books written about my adventures and songs about my operations…
D. Zip-line 题目连接: http://www.codeforces.com/contest/650/problem/D Description Vasya has decided to build a zip-line on trees of a nearby forest. He wants the line to be as long as possible but he doesn't remember exactly the heights of all trees in t…
E. Table Compression 题目连接: http://www.codeforces.com/contest/651/problem/E Description Little Petya is now fond of data compression algorithms. He has already studied gz, bz, zip algorithms and many others. Inspired by the new knowledge, Petya is now…
C. Watchmen 题目连接: http://www.codeforces.com/contest/651/problem/C Description Watchmen are in a danger and Doctor Manhattan together with his friend Daniel Dreiberg should warn them as soon as possible. There are n watchmen on a plane, the i-th watch…