暴力+胡乱优化就过了..tags给的东西似乎什么都没用到.....CF的数据是不是有点水啊.....果然是没有营养的题目..... D. Vessels time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There is a system of n vessels arranged one above the other as…
题目描述: Vessels time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There is a system of n vessels arranged one above the other as shown in the figure below. Assume that the vessels are numbered…
Training address: http://acm.hust.edu.cn/vjudge/contest/view.action?cid=38994#overview B.Xenia and Bit Operations ----Codeforces 339D 线段树大水题..每个节点维护一个flag,flag=1表示此时应与其兄弟节点做或(|)操作,flag=2表示做异或(^)操作,然后pushup... 代码: #include <iostream> #include <cst…
D. Vessels time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There is a system of n vessels arranged one above the other as shown in the figure below. Assume that the vessels are numbered fr…
http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n grid. In this game a ships are placed on the grid. Each of the ships consists of bconsecutive cells. No cell can be part of two ships, however, the shi…
http://codeforces.com/contest/738/problem/C Vasya is currently at a car rental service, and he wants to reach cinema. The film he has bought a ticket for starts in t minutes. There is a straight road of length s from the service to the cinema. Let's…