Inna and Alarm Clock time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Inna loves sleeping very much, so she needs n ala
A. Inna and Alarm Clock time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Inna loves sleeping very much, so she needs n
Inna likes sweets and a game called the "Candy Matrix". Today, she came up with the new game "Candy Matrix 2: Reload". The field for the new game is a rectangle table of size n × m. Each line of the
Dima and Inna are doing so great! At the moment, Inna is sitting on the magic lawn playing with a pink pony. Dima wanted to play too. He brought an n × m chessboard, a very tasty candy and two num
题目链接:Codeforces 400B Inna and New Matrix of Candies 题目大意:给出n和m表示有n行m列,每一行上有一个小人G和一个糖果S,每次操作可以让所有小人一起向右移动,直到有某个小人碰到糖果或者是走到尽头,问说至少要多少次操作才可以使得所有小人都吃到糖果,如果有小人吃不到糖果输出-1. 解题思路:暴力,对于每一行记录住小人移动到糖果需要多少