Submission #60738198


Source Code Expand

import java.math.BigInteger
import scala.annotation.tailrec
import scala.collection.immutable.IntMap
import scala.collection.mutable
import scala.collection.mutable.ArrayBuffer
import scala.io.StdIn.readLine
import scala.util.Random
import scala.util.chaining.*


@main def main =
  val problems = "ABCDE"
  val score = readLine.split(' ').map(_.toInt)

  val allCompetitor = (1 until 32).map(i => problems.indices.filter(j => ((i >> j) & 1) != 0).map(problems).mkString(""))
  val allScore = (1 until 32).map(i => score.indices.filter(j => ((i >> j) & 1) != 0).map(score).sum)
  val result = allCompetitor.indices.sortWith((i, j) => if allScore(i) == allScore(j) then allCompetitor(i) < allCompetitor(j) else allScore(i) > allScore(j))
  println(result.map(allCompetitor).mkString("\n"))

Submission Info

Submission Time
Task C - Perfect Standings
User yudedako
Language Scala (Dotty 3.3.0)
Score 300
Code Size 805 Byte
Status AC
Exec Time 258 ms
Memory 53660 KiB

Compile Error

Starting compilation server
Compiling project (Scala 3.3.0, JVM)
Compiled project (Scala 3.3.0, JVM)
Wrote /judge/Main, run it with
  ./Main

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 34
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt, 01_random_23.txt, 01_random_24.txt, 01_random_25.txt, 01_random_26.txt, 01_random_27.txt, 01_random_28.txt, 01_random_29.txt, 01_random_30.txt, 01_random_31.txt, 01_random_32.txt, 01_random_33.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 234 ms 53584 KiB
00_sample_01.txt AC 232 ms 53624 KiB
00_sample_02.txt AC 233 ms 53448 KiB
01_random_03.txt AC 237 ms 53316 KiB
01_random_04.txt AC 234 ms 53316 KiB
01_random_05.txt AC 232 ms 53240 KiB
01_random_06.txt AC 258 ms 53480 KiB
01_random_07.txt AC 226 ms 53244 KiB
01_random_08.txt AC 228 ms 53584 KiB
01_random_09.txt AC 228 ms 53648 KiB
01_random_10.txt AC 217 ms 53140 KiB
01_random_11.txt AC 230 ms 53240 KiB
01_random_12.txt AC 220 ms 53504 KiB
01_random_13.txt AC 235 ms 53316 KiB
01_random_14.txt AC 235 ms 53280 KiB
01_random_15.txt AC 231 ms 53336 KiB
01_random_16.txt AC 229 ms 53320 KiB
01_random_17.txt AC 221 ms 53424 KiB
01_random_18.txt AC 230 ms 53576 KiB
01_random_19.txt AC 230 ms 53436 KiB
01_random_20.txt AC 228 ms 53476 KiB
01_random_21.txt AC 230 ms 53328 KiB
01_random_22.txt AC 229 ms 53544 KiB
01_random_23.txt AC 255 ms 53228 KiB
01_random_24.txt AC 223 ms 53196 KiB
01_random_25.txt AC 231 ms 53260 KiB
01_random_26.txt AC 233 ms 53660 KiB
01_random_27.txt AC 228 ms 53316 KiB
01_random_28.txt AC 224 ms 53072 KiB
01_random_29.txt AC 221 ms 53320 KiB
01_random_30.txt AC 224 ms 53444 KiB
01_random_31.txt AC 215 ms 53064 KiB
01_random_32.txt AC 224 ms 53244 KiB
01_random_33.txt AC 226 ms 53572 KiB