5168. 【NOIP2017模擬6.26】衝擊哥

Description Input Output Sample Input 1 3 Sample Output ABA Data Constraint n、m≤100 Solution 貪心。枚舉每一塊磚,如果這個位置爲空,就填入字典序最小的磚塊,然後將邊長一格格拓展 如果當前右側位置可以填入字典序更小的磚塊,就不拓展 否則判斷能否拓展並拓展。 Code1 #include<cstdio> #in
相關文章
相關標籤/搜索