Submission #13332676


Source Code Expand

Copy
object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val charCounts: Seq[Map[Char, Int]] =
    Seq.fill(sc.nextInt())(sc.next()).map(_.toCharArray.toSeq.groupBy(identity).mapValues(_.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 361 Byte
Status TLE
Exec Time 2103 ms
Memory 182828 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
AC × 5
TLE × 8
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 363 ms 25388 KB
a02 AC 351 ms 25416 KB
a03 AC 354 ms 23580 KB
b04 AC 351 ms 25424 KB
b05 TLE 2103 ms 152400 KB
b06 TLE 2103 ms 157584 KB
b07 TLE 2057 ms 155364 KB
b08 TLE 2103 ms 180308 KB
b09 TLE 2103 ms 124064 KB
b10 TLE 2103 ms 127532 KB
b11 TLE 2103 ms 182828 KB
b12 TLE 2103 ms 117908 KB
b13 AC 754 ms 38592 KB