fork download
  1. object Main extends App {
  2. ((seq: Seq[(Int, Int)]) => println(((weight: Int, temp: Int, places: Seq[(Int, Int)]) => for {i <- Range(0, places.length); place = places(i); if place._1 >= weight && place._2 <= temp} yield i + 1)(seq.head._1, seq.head._2, seq.tail).mkString(" ")))(io.Source.stdin.mkString.split("\n").map(_.split(" ").map(_.toInt)).map(a => (a(0), a(1))))
  3. }
Success #stdin #stdout 0.18s 322496KB
stdin
100 120
297 90
66 110
257 113
276 191
280 129
219 163
254 193
86 153
206 147
71 137
104 40
238 127
52 146
129 197
144 59
157 124
210 59
11 54
268 119
261 121
12 189
186 108
174 21
77 18
54 90
174 52
16 129
59 181
290 123
248 132
stdout
1 3 11 15 17 19 22 23 26