A. Sea Battle time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output In order to make the "Sea Battle" game more interesting, Boris decided to add a new ship type to it. The ship consists of…
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…
A. Sea Battle time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output In order to make the "Sea Battle" game more interesting, Boris decided to add a new ship type to it. The ship consists of…
链接:https://codeforces.com/contest/1131/problem/A 题意: 给两个矩形,一个再上一个在下,求两个矩形合并的周围一圈的面积. 思路: 因为存在下面矩形宽度大于上面,所以先求下面矩形周围面积,再求上方矩形最下一行除外的面积. 代码: #include <bits/stdc++.h> using namespace std; typedef long long LL; int main() { int w1, h1, w2, h2; cin >&g…
B. Draw! time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You still have partial information about the score during the historic football match. You are given a set of pairs (ai,bi)(ai,bi),…
F. Asya And Kittens time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Asya loves animals very much. Recently, she purchased nn kittens, enumerated them from 11 and nn and then put them into…
C. Birthday time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Cowboy Vlad has a birthday today! There are nn children who came to the celebration. In order to greet Vlad, the children decided…