Submission #13334336


Source Code Expand

Copy
object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val charCounts =
    Seq.fill(sc.nextInt())(sc.next()).map(_.toCharArray.toSeq.groupBy(identity).map { case (key, value) => key.hashCode() -> value.size })
  val groupCounts = charCounts.groupBy(identity).mapValues(_.size).values
  println(groupCounts.foldLeft(0L)((acc, i) => acc + (1 until i).sum))
}

Submission Info

Submission Time
Task C - Green Bin
User nozzjp
Language Scala (2.11.7)
Score 0
Code Size 380 Byte
Status TLE
Exec Time 2111 ms
Memory 155276 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
AC × 6
TLE × 7
Set Name Test Cases
Sample a01, a02, a03
All a01, a02, a03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13
Case Name Status Exec Time Memory
a01 AC 369 ms 25676 KB
a02 AC 353 ms 25420 KB
a03 AC 358 ms 23620 KB
b04 AC 356 ms 25288 KB
b05 TLE 2103 ms 155276 KB
b06 TLE 2111 ms 152424 KB
b07 AC 1705 ms 125876 KB
b08 TLE 2103 ms 148356 KB
b09 TLE 2103 ms 145032 KB
b10 TLE 2103 ms 149604 KB
b11 TLE 2103 ms 147468 KB
b12 TLE 2103 ms 148180 KB
b13 AC 858 ms 38596 KB