首先按照惯例,我先来扯点别的,大佬就是牛逼,Rank1的学长,Rank1并不耽误水群,我就不一样了,就做出来前两个题,然后第一题还是第三遍A掉的(应该声明:本次比赛应该是来自CodeForces的题目)
还有就是读题永远是我过不去的伤
A - New Building for SIS
You are looking at the floor plan of the Summer Informatics School’s new building. You were tasked with SIS logistics, so you really care about travel time between different locations: it is important to know how long it would take to get from the lecture room to the canteen, or from the gym to the server room.
The building consists of n towers, h floors each, where the towers are labeled from 1 to n, the floors are labeled from 1 to h. There is a passage between any two adjacent to