题目大意: 给出N个捆包,每个捆包有相应的长度和宽度,要求堆叠捆包,使下方的捆包长宽永远大于上方的捆包的长宽. Input Multiple test case. For each case: * Line 1: A single integer, N * Lines 2..N+1: Each line describes a bale with two space-separated integers, respectively the width and breadth Output For…
D. Block Tower time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output After too much playing on paper, Iahub has switched to computer games. The game he plays is called "Block Towers". It is…
D. Bear and Tower of Cubes 题目连接: http://www.codeforces.com/contest/680/problem/D Description Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many…
题目链接: D. Bear and Tower of Cubes time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive…