//No.90 品物の並び替え //No.98 品物の並び替え (Extra) import std.stdio; int[50][50] mat; int N, M; void main() { readf("%d %d\n", &N, &M); for(int i=0; i max) max = localMax; } } return max; } ulong addScore(const bool[] used, const int item, const int remain) { ulong total = 0; int count = 0; for(int i=0; i