You are viewing a single comment's thread. Return to all comments →
Shorter version:
static int luckBalance(int k, int[][] contests) { var minLosses = contests .Where(x => x[1] == 1) .OrderByDescending(x => x[0]) .Skip(k) .Sum(x => x[0]); var totalVal = contests.Sum(x => x[0]); return totalVal - (minLosses * 2); }
Seems like cookies are disabled on this browser, please enable them to open this website
Luck Balance
You are viewing a single comment's thread. Return to all comments →
Shorter version: