package facebook.y2020.round3

import java.util.*

private fun solve(): Int {
	val (n, m, k, x) = readInts()
	val (sIn, pIn) = listOf(n, m).map { length ->
		val array = readInts().toIntArray() + IntArray(length - k) { 0 }
		val (a, b, c, d) = readInts()
		for (i in k until length) {
			array[i] = ((a.toLong() * array[i - 2] + b.toLong() * array[i - 1] + c) % d).toInt() + 1
		}
		array
	}

	val set = TreeMap<Int, Deque<Int>>()
	fun add(size: Int) {
		val r = size % x
		set.putIfAbsent(r, LinkedList())
		set[r]!!.addLast(size)
	}
	fun remove(p: Int): Int {
		val r = p % x
		val q = set.ceilingKey(r) ?: set.ceilingKey(0)
		val size = set[q]!!.pollFirst()
		if (set[q]!!.isEmpty()) {
			set.remove(q)
		}
		return (size - p) / x
	}

	val sizes = sIn.sortedDescending()
	val sizesLarge = sizes.filter { it >= x }
	val sizesSmall = sizes.filter { it < x }
	val packages = pIn.sorted()
	var low = 0
	var high = minOf(n, m) + 1
	while (low + 1 < high) {
		val mid = (low + high) / 2
		var i = 0
		var j = 0
		val deque = LinkedList<Int>()
		var keys = 0L
		var bad = false
		for (p in packages.take(mid).reversed()) {
			while ((i < sizesLarge.size) && (sizesLarge[i] >= p)) {
				add(sizesLarge[i])
				i++
			}
			while ((j < sizesSmall.size) && (sizesSmall[j] >= p)) {
				deque.addLast(sizesSmall[j])
				j++
			}
			if (set.isEmpty()) {
				if (p < x) {
					if (deque.isNotEmpty()) {
						deque.removeLast()
						continue
					}
				}
				bad = true
				break
			}
			keys += remove(p)
		}
		while (i < sizesLarge.size) {
			add(sizesLarge[i])
			i++
		}
		while (j < sizesSmall.size) {
			deque.addLast(sizesSmall[j])
			j++
		}
		while (set.isNotEmpty()) {
			keys += remove(0)
		}
		while (deque.isNotEmpty()) {
			deque.removeLast()
			keys++
		}
		if (bad || keys < n - 1) high = mid else low = mid
	}
	return low
}

fun main() = repeat(readInt()) { println("Case #${it + 1}: ${solve()}") }

private fun readLn() = readLine()!!
private fun readInt() = readLn().toInt()
private fun readStrings() = readLn().split(" ")
private fun readInts() = readStrings().map { it.toInt() }

Compiled from "b.kt"
public final class facebook.y2020.round3.BKt {
  private static final int solve();
    Code:
       0: invokestatic  #10                 // Method readInts:()Ljava/util/List;
       3: astore_0
       4: aload_0
       5: iconst_0
       6: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      11: checkcast     #18                 // class java/lang/Number
      14: invokevirtual #21                 // Method java/lang/Number.intValue:()I
      17: istore_1
      18: aload_0
      19: iconst_1
      20: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      25: checkcast     #18                 // class java/lang/Number
      28: invokevirtual #21                 // Method java/lang/Number.intValue:()I
      31: istore_2
      32: aload_0
      33: iconst_2
      34: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      39: checkcast     #18                 // class java/lang/Number
      42: invokevirtual #21                 // Method java/lang/Number.intValue:()I
      45: istore_3
      46: aload_0
      47: iconst_3
      48: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      53: checkcast     #18                 // class java/lang/Number
      56: invokevirtual #21                 // Method java/lang/Number.intValue:()I
      59: istore        4
      61: iconst_2
      62: anewarray     #23                 // class java/lang/Integer
      65: astore        6
      67: aload         6
      69: iconst_0
      70: iload_1
      71: invokestatic  #27                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      74: aastore
      75: aload         6
      77: iconst_1
      78: iload_2
      79: invokestatic  #27                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      82: aastore
      83: aload         6
      85: invokestatic  #33                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      88: checkcast     #35                 // class java/lang/Iterable
      91: astore        6
      93: iconst_0
      94: istore        7
      96: aload         6
      98: astore        8
     100: new           #37                 // class java/util/ArrayList
     103: dup
     104: aload         6
     106: bipush        10
     108: invokestatic  #41                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     111: invokespecial #45                 // Method java/util/ArrayList."<init>":(I)V
     114: checkcast     #47                 // class java/util/Collection
     117: astore        9
     119: iconst_0
     120: istore        10
     122: aload         8
     124: invokeinterface #51,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     129: astore        11
     131: aload         11
     133: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     138: ifeq          365
     141: aload         11
     143: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     148: astore        12
     150: aload         9
     152: aload         12
     154: checkcast     #18                 // class java/lang/Number
     157: invokevirtual #21                 // Method java/lang/Number.intValue:()I
     160: istore        13
     162: astore        24
     164: iconst_0
     165: istore        14
     167: invokestatic  #10                 // Method readInts:()Ljava/util/List;
     170: checkcast     #47                 // class java/util/Collection
     173: invokestatic  #65                 // Method kotlin/collections/CollectionsKt.toIntArray:(Ljava/util/Collection;)[I
     176: iconst_0
     177: istore        15
     179: iload         13
     181: iload_3
     182: isub
     183: istore        16
     185: iload         16
     187: newarray       int
     189: astore        17
     191: astore        18
     193: iload         15
     195: iload         16
     197: if_icmpge     216
     200: iload         15
     202: istore        19
     204: aload         17
     206: iload         19
     208: iconst_0
     209: iastore
     210: iinc          15, 1
     213: goto          193
     216: aload         18
     218: aload         17
     220: invokestatic  #71                 // Method kotlin/collections/ArraysKt.plus:([I[I)[I
     223: astore        20
     225: invokestatic  #10                 // Method readInts:()Ljava/util/List;
     228: astore        15
     230: aload         15
     232: iconst_0
     233: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     238: checkcast     #18                 // class java/lang/Number
     241: invokevirtual #21                 // Method java/lang/Number.intValue:()I
     244: istore        16
     246: aload         15
     248: iconst_1
     249: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     254: checkcast     #18                 // class java/lang/Number
     257: invokevirtual #21                 // Method java/lang/Number.intValue:()I
     260: istore        17
     262: aload         15
     264: iconst_2
     265: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     270: checkcast     #18                 // class java/lang/Number
     273: invokevirtual #21                 // Method java/lang/Number.intValue:()I
     276: istore        19
     278: aload         15
     280: iconst_3
     281: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     286: checkcast     #18                 // class java/lang/Number
     289: invokevirtual #21                 // Method java/lang/Number.intValue:()I
     292: istore        21
     294: iload_3
     295: istore        22
     297: iload         22
     299: iload         13
     301: if_icmpge     351
     304: aload         20
     306: iload         22
     308: iload         16
     310: i2l
     311: aload         20
     313: iload         22
     315: iconst_2
     316: isub
     317: iaload
     318: i2l
     319: lmul
     320: iload         17
     322: i2l
     323: aload         20
     325: iload         22
     327: iconst_1
     328: isub
     329: iaload
     330: i2l
     331: lmul
     332: ladd
     333: iload         19
     335: i2l
     336: ladd
     337: iload         21
     339: i2l
     340: lrem
     341: l2i
     342: iconst_1
     343: iadd
     344: iastore
     345: iinc          22, 1
     348: goto          297
     351: aload         20
     353: aload         24
     355: swap
     356: invokeinterface #75,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     361: pop
     362: goto          131
     365: aload         9
     367: checkcast     #12                 // class java/util/List
     370: nop
     371: astore        5
     373: aload         5
     375: iconst_0
     376: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     381: checkcast     #77                 // class "[I"
     384: astore        6
     386: aload         5
     388: iconst_1
     389: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     394: checkcast     #77                 // class "[I"
     397: astore        7
     399: new           #79                 // class java/util/TreeMap
     402: dup
     403: invokespecial #82                 // Method java/util/TreeMap."<init>":()V
     406: astore        8
     408: aload         6
     410: invokestatic  #86                 // Method kotlin/collections/ArraysKt.sortedDescending:([I)Ljava/util/List;
     413: astore        9
     415: aload         9
     417: checkcast     #35                 // class java/lang/Iterable
     420: astore        11
     422: iconst_0
     423: istore        12
     425: aload         11
     427: astore        13
     429: new           #37                 // class java/util/ArrayList
     432: dup
     433: invokespecial #87                 // Method java/util/ArrayList."<init>":()V
     436: checkcast     #47                 // class java/util/Collection
     439: astore        14
     441: iconst_0
     442: istore        15
     444: aload         13
     446: invokeinterface #51,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     451: astore        16
     453: aload         16
     455: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     460: ifeq          513
     463: aload         16
     465: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     470: astore        17
     472: aload         17
     474: checkcast     #18                 // class java/lang/Number
     477: invokevirtual #21                 // Method java/lang/Number.intValue:()I
     480: istore        18
     482: iconst_0
     483: istore        19
     485: iload         18
     487: iload         4
     489: if_icmplt     496
     492: iconst_1
     493: goto          497
     496: iconst_0
     497: ifeq          453
     500: aload         14
     502: aload         17
     504: invokeinterface #75,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     509: pop
     510: goto          453
     513: aload         14
     515: checkcast     #12                 // class java/util/List
     518: nop
     519: astore        10
     521: aload         9
     523: checkcast     #35                 // class java/lang/Iterable
     526: astore        12
     528: iconst_0
     529: istore        13
     531: aload         12
     533: astore        14
     535: new           #37                 // class java/util/ArrayList
     538: dup
     539: invokespecial #87                 // Method java/util/ArrayList."<init>":()V
     542: checkcast     #47                 // class java/util/Collection
     545: astore        15
     547: iconst_0
     548: istore        16
     550: aload         14
     552: invokeinterface #51,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     557: astore        17
     559: aload         17
     561: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     566: ifeq          619
     569: aload         17
     571: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     576: astore        18
     578: aload         18
     580: checkcast     #18                 // class java/lang/Number
     583: invokevirtual #21                 // Method java/lang/Number.intValue:()I
     586: istore        19
     588: iconst_0
     589: istore        20
     591: iload         19
     593: iload         4
     595: if_icmpge     602
     598: iconst_1
     599: goto          603
     602: iconst_0
     603: ifeq          559
     606: aload         15
     608: aload         18
     610: invokeinterface #75,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     615: pop
     616: goto          559
     619: aload         15
     621: checkcast     #12                 // class java/util/List
     624: nop
     625: astore        11
     627: aload         7
     629: invokestatic  #90                 // Method kotlin/collections/ArraysKt.sorted:([I)Ljava/util/List;
     632: astore        12
     634: iconst_0
     635: istore        13
     637: iload_1
     638: iload_2
     639: invokestatic  #96                 // Method java/lang/Math.min:(II)I
     642: iconst_1
     643: iadd
     644: istore        14
     646: iload         13
     648: iconst_1
     649: iadd
     650: iload         14
     652: if_icmpge     1093
     655: iload         13
     657: iload         14
     659: iadd
     660: iconst_2
     661: idiv
     662: istore        15
     664: iconst_0
     665: istore        16
     667: iconst_0
     668: istore        17
     670: new           #98                 // class java/util/LinkedList
     673: dup
     674: invokespecial #99                 // Method java/util/LinkedList."<init>":()V
     677: astore        18
     679: lconst_0
     680: lstore        19
     682: iconst_0
     683: istore        21
     685: aload         12
     687: checkcast     #35                 // class java/lang/Iterable
     690: iload         15
     692: invokestatic  #103                // Method kotlin/collections/CollectionsKt.take:(Ljava/lang/Iterable;I)Ljava/util/List;
     695: checkcast     #35                 // class java/lang/Iterable
     698: invokestatic  #107                // Method kotlin/collections/CollectionsKt.reversed:(Ljava/lang/Iterable;)Ljava/util/List;
     701: invokeinterface #108,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     706: astore        22
     708: aload         22
     710: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     715: ifeq          914
     718: aload         22
     720: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     725: checkcast     #18                 // class java/lang/Number
     728: invokevirtual #21                 // Method java/lang/Number.intValue:()I
     731: istore        23
     733: iload         16
     735: aload         10
     737: invokeinterface #111,  1          // InterfaceMethod java/util/List.size:()I
     742: if_icmpge     793
     745: aload         10
     747: iload         16
     749: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     754: checkcast     #18                 // class java/lang/Number
     757: invokevirtual #21                 // Method java/lang/Number.intValue:()I
     760: iload         23
     762: if_icmplt     793
     765: iload         4
     767: aload         8
     769: aload         10
     771: iload         16
     773: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     778: checkcast     #18                 // class java/lang/Number
     781: invokevirtual #21                 // Method java/lang/Number.intValue:()I
     784: invokestatic  #115                // Method solve$add:(ILjava/util/TreeMap;I)V
     787: iinc          16, 1
     790: goto          733
     793: iload         17
     795: aload         11
     797: invokeinterface #111,  1          // InterfaceMethod java/util/List.size:()I
     802: if_icmpge     845
     805: aload         11
     807: iload         17
     809: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     814: checkcast     #18                 // class java/lang/Number
     817: invokevirtual #21                 // Method java/lang/Number.intValue:()I
     820: iload         23
     822: if_icmplt     845
     825: aload         18
     827: aload         11
     829: iload         17
     831: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     836: invokevirtual #119                // Method java/util/LinkedList.addLast:(Ljava/lang/Object;)V
     839: iinc          17, 1
     842: goto          793
     845: aload         8
     847: invokevirtual #122                // Method java/util/TreeMap.isEmpty:()Z
     850: ifeq          896
     853: iload         23
     855: iload         4
     857: if_icmpge     890
     860: aload         18
     862: checkcast     #47                 // class java/util/Collection
     865: invokeinterface #123,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     870: ifne          877
     873: iconst_1
     874: goto          878
     877: iconst_0
     878: ifeq          890
     881: aload         18
     883: invokevirtual #126                // Method java/util/LinkedList.removeLast:()Ljava/lang/Object;
     886: pop
     887: goto          708
     890: iconst_1
     891: istore        21
     893: goto          914
     896: lload         19
     898: iload         4
     900: aload         8
     902: iload         23
     904: invokestatic  #130                // Method solve$remove:(ILjava/util/TreeMap;I)I
     907: i2l
     908: ladd
     909: lstore        19
     911: goto          708
     914: iload         16
     916: aload         10
     918: invokeinterface #111,  1          // InterfaceMethod java/util/List.size:()I
     923: if_icmpge     954
     926: iload         4
     928: aload         8
     930: aload         10
     932: iload         16
     934: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     939: checkcast     #18                 // class java/lang/Number
     942: invokevirtual #21                 // Method java/lang/Number.intValue:()I
     945: invokestatic  #115                // Method solve$add:(ILjava/util/TreeMap;I)V
     948: iinc          16, 1
     951: goto          914
     954: iload         17
     956: aload         11
     958: invokeinterface #111,  1          // InterfaceMethod java/util/List.size:()I
     963: if_icmpge     986
     966: aload         18
     968: aload         11
     970: iload         17
     972: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     977: invokevirtual #119                // Method java/util/LinkedList.addLast:(Ljava/lang/Object;)V
     980: iinc          17, 1
     983: goto          954
     986: aload         8
     988: checkcast     #132                // class java/util/Map
     991: invokeinterface #133,  1          // InterfaceMethod java/util/Map.isEmpty:()Z
     996: ifne          1003
     999: iconst_1
    1000: goto          1004
    1003: iconst_0
    1004: ifeq          1024
    1007: lload         19
    1009: iload         4
    1011: aload         8
    1013: iconst_0
    1014: invokestatic  #130                // Method solve$remove:(ILjava/util/TreeMap;I)I
    1017: i2l
    1018: ladd
    1019: lstore        19
    1021: goto          986
    1024: aload         18
    1026: checkcast     #47                 // class java/util/Collection
    1029: invokeinterface #123,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
    1034: ifne          1041
    1037: iconst_1
    1038: goto          1042
    1041: iconst_0
    1042: ifeq          1064
    1045: aload         18
    1047: invokevirtual #126                // Method java/util/LinkedList.removeLast:()Ljava/lang/Object;
    1050: pop
    1051: lload         19
    1053: lstore        22
    1055: lload         22
    1057: lconst_1
    1058: ladd
    1059: lstore        19
    1061: goto          1024
    1064: iload         21
    1066: ifne          1079
    1069: lload         19
    1071: iload_1
    1072: iconst_1
    1073: isub
    1074: i2l
    1075: lcmp
    1076: ifge          1086
    1079: iload         15
    1081: istore        14
    1083: goto          646
    1086: iload         15
    1088: istore        13
    1090: goto          646
    1093: iload         13
    1095: ireturn

  public static final void main();
    Code:
       0: invokestatic  #187                // Method readInt:()I
       3: istore_0
       4: iconst_0
       5: istore_1
       6: iload_1
       7: iload_0
       8: if_icmpge     61
      11: iload_1
      12: istore_2
      13: iconst_0
      14: istore_3
      15: new           #189                // class java/lang/StringBuilder
      18: dup
      19: invokespecial #190                // Method java/lang/StringBuilder."<init>":()V
      22: ldc           #192                // String Case #
      24: invokevirtual #196                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      27: iload_2
      28: iconst_1
      29: iadd
      30: invokevirtual #199                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      33: ldc           #201                // String :
      35: invokevirtual #196                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      38: invokestatic  #203                // Method solve:()I
      41: invokevirtual #199                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      44: invokevirtual #207                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      47: getstatic     #213                // Field java/lang/System.out:Ljava/io/PrintStream;
      50: swap
      51: invokevirtual #218                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      54: nop
      55: iinc          1, 1
      58: goto          6
      61: return

  private static final java.lang.String readLn();
    Code:
       0: invokestatic  #225                // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
       3: dup
       4: invokestatic  #230                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
       7: areturn

  private static final int readInt();
    Code:
       0: invokestatic  #232                // Method readLn:()Ljava/lang/String;
       3: invokestatic  #236                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
       6: ireturn

  private static final java.util.List<java.lang.String> readStrings();
    Code:
       0: invokestatic  #232                // Method readLn:()Ljava/lang/String;
       3: checkcast     #240                // class java/lang/CharSequence
       6: iconst_1
       7: anewarray     #242                // class java/lang/String
      10: astore_0
      11: aload_0
      12: iconst_0
      13: ldc           #244                // String
      15: aastore
      16: aload_0
      17: iconst_0
      18: iconst_0
      19: bipush        6
      21: aconst_null
      22: invokestatic  #250                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      25: areturn

  private static final java.util.List<java.lang.Integer> readInts();
    Code:
       0: invokestatic  #253                // Method readStrings:()Ljava/util/List;
       3: checkcast     #35                 // class java/lang/Iterable
       6: astore_0
       7: iconst_0
       8: istore_1
       9: aload_0
      10: astore_2
      11: new           #37                 // class java/util/ArrayList
      14: dup
      15: aload_0
      16: bipush        10
      18: invokestatic  #41                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #45                 // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #47                 // class java/util/Collection
      27: astore_3
      28: iconst_0
      29: istore        4
      31: aload_2
      32: invokeinterface #51,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore        5
      39: aload         5
      41: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          92
      49: aload         5
      51: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      56: astore        6
      58: aload_3
      59: aload         6
      61: checkcast     #242                // class java/lang/String
      64: astore        7
      66: astore        9
      68: iconst_0
      69: istore        8
      71: aload         7
      73: invokestatic  #236                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      76: nop
      77: invokestatic  #27                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      80: aload         9
      82: swap
      83: invokeinterface #75,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      88: pop
      89: goto          39
      92: aload_3
      93: checkcast     #12                 // class java/util/List
      96: nop
      97: areturn

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #258                // Method main:()V
       3: return

  private static final void solve$add(int, java.util.TreeMap<java.lang.Integer, java.util.Deque<java.lang.Integer>>, int);
    Code:
       0: iload_2
       1: iload_0
       2: irem
       3: istore_3
       4: aload_1
       5: iload_3
       6: invokestatic  #27                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
       9: new           #98                 // class java/util/LinkedList
      12: dup
      13: invokespecial #99                 // Method java/util/LinkedList."<init>":()V
      16: invokevirtual #265                // Method java/util/TreeMap.putIfAbsent:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      19: pop
      20: aload_1
      21: iload_3
      22: invokestatic  #27                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      25: invokevirtual #268                // Method java/util/TreeMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
      28: dup
      29: invokestatic  #230                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      32: checkcast     #270                // class java/util/Deque
      35: iload_2
      36: invokestatic  #27                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      39: invokeinterface #271,  2          // InterfaceMethod java/util/Deque.addLast:(Ljava/lang/Object;)V
      44: return

  private static final int solve$remove(int, java.util.TreeMap<java.lang.Integer, java.util.Deque<java.lang.Integer>>, int);
    Code:
       0: iload_2
       1: iload_0
       2: irem
       3: istore_3
       4: aload_1
       5: iload_3
       6: invokestatic  #27                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
       9: invokevirtual #276                // Method java/util/TreeMap.ceilingKey:(Ljava/lang/Object;)Ljava/lang/Object;
      12: checkcast     #23                 // class java/lang/Integer
      15: dup
      16: ifnonnull     31
      19: pop
      20: aload_1
      21: iconst_0
      22: invokestatic  #27                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      25: invokevirtual #276                // Method java/util/TreeMap.ceilingKey:(Ljava/lang/Object;)Ljava/lang/Object;
      28: checkcast     #23                 // class java/lang/Integer
      31: astore        4
      33: aload_1
      34: aload         4
      36: invokevirtual #268                // Method java/util/TreeMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
      39: dup
      40: invokestatic  #230                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      43: checkcast     #270                // class java/util/Deque
      46: invokeinterface #279,  1          // InterfaceMethod java/util/Deque.pollFirst:()Ljava/lang/Object;
      51: checkcast     #23                 // class java/lang/Integer
      54: astore        5
      56: aload_1
      57: aload         4
      59: invokevirtual #268                // Method java/util/TreeMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
      62: dup
      63: invokestatic  #230                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      66: checkcast     #270                // class java/util/Deque
      69: invokeinterface #280,  1          // InterfaceMethod java/util/Deque.isEmpty:()Z
      74: ifeq          84
      77: aload_1
      78: aload         4
      80: invokevirtual #283                // Method java/util/TreeMap.remove:(Ljava/lang/Object;)Ljava/lang/Object;
      83: pop
      84: aload         5
      86: invokevirtual #284                // Method java/lang/Integer.intValue:()I
      89: iload_2
      90: isub
      91: iload_0
      92: idiv
      93: ireturn
}


package facebook.y2020.round3

private fun solve(): String {
	val (n, k) = readInts()
	data class Measurement(val time: Int, val p: Int, val r: Int)
	val measurements = List(n) {
		val (p, r) = readInts()
		Measurement(it, p, r)
	}
	val ps = measurements.map { it.p }.toSet().sorted()
	var a = Array(k + 1) { n + 1 to 0 }
	a[0] = 0 to 0
	for (p in ps) {
		val ms = measurements.filter { it.p == p }
		val b = Array(k + 1) { n + 1 to 0 }
		for (crosses in 0..ms.size) {
			if (crosses > 0 && ms[crosses - 1].r == 1) continue
			var toDelete = 0
			for (i in ms.indices) {
				if (i < crosses && ms[i].r == 1) toDelete++
				if (i >= crosses && ms[i].r == 0) toDelete++
			}
			val lastCross = if (crosses == 0) -1 else ms[crosses - 1].time
			val firstTick = if (crosses == ms.size) n else ms[crosses].time
			for (q in 0..k) {

			}
		}
		a = b
	}
	return ""
}

fun main() = repeat(readInt()) { println("Case #${it + 1}: ${solve()}") }

private fun readLn() = readLine()!!
private fun readInt() = readLn().toInt()
private fun readStrings() = readLn().split(" ")
private fun readInts() = readStrings().map { it.toInt() }

Compiled from "c.kt"
public final class facebook.y2020.round3.CKt$solve$Measurement {
  private final int time;

  private final int p;

  private final int r;

  public facebook.y2020.round3.CKt$solve$Measurement(int, int, int);
    Code:
       0: aload_0
       1: invokespecial #9                  // Method java/lang/Object."<init>":()V
       4: aload_0
       5: iload_1
       6: putfield      #13                 // Field time:I
       9: aload_0
      10: iload_2
      11: putfield      #16                 // Field p:I
      14: aload_0
      15: iload_3
      16: putfield      #19                 // Field r:I
      19: return

  public final int getTime();
    Code:
       0: aload_0
       1: getfield      #13                 // Field time:I
       4: ireturn

  public final int getP();
    Code:
       0: aload_0
       1: getfield      #16                 // Field p:I
       4: ireturn

  public final int getR();
    Code:
       0: aload_0
       1: getfield      #19                 // Field r:I
       4: ireturn

  public final int component1();
    Code:
       0: aload_0
       1: getfield      #13                 // Field time:I
       4: ireturn

  public final int component2();
    Code:
       0: aload_0
       1: getfield      #16                 // Field p:I
       4: ireturn

  public final int component3();
    Code:
       0: aload_0
       1: getfield      #19                 // Field r:I
       4: ireturn

  public final facebook.y2020.round3.CKt$solve$Measurement copy(int, int, int);
    Code:
       0: new           #2                  // class facebook/y2020/round3/CKt$solve$Measurement
       3: dup
       4: iload_1
       5: iload_2
       6: iload_3
       7: invokespecial #32                 // Method "<init>":(III)V
      10: areturn

  public static facebook.y2020.round3.CKt$solve$Measurement copy$default(facebook.y2020.round3.CKt$solve$Measurement, int, int, int, int, java.lang.Object);
    Code:
       0: iload         4
       2: iconst_1
       3: iand
       4: ifeq          12
       7: aload_0
       8: getfield      #13                 // Field time:I
      11: istore_1
      12: iload         4
      14: iconst_2
      15: iand
      16: ifeq          24
      19: aload_0
      20: getfield      #16                 // Field p:I
      23: istore_2
      24: iload         4
      26: iconst_4
      27: iand
      28: ifeq          36
      31: aload_0
      32: getfield      #19                 // Field r:I
      35: istore_3
      36: aload_0
      37: iload_1
      38: iload_2
      39: iload_3
      40: invokevirtual #36                 // Method copy:(III)Lfacebook/y2020/round3/CKt$solve$Measurement;
      43: areturn

  public java.lang.String toString();
    Code:
       0: new           #40                 // class java/lang/StringBuilder
       3: dup
       4: invokespecial #41                 // Method java/lang/StringBuilder."<init>":()V
       7: ldc           #43                 // String Measurement(time=
       9: invokevirtual #47                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      12: aload_0
      13: getfield      #13                 // Field time:I
      16: invokevirtual #50                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      19: ldc           #52                 // String , p=
      21: invokevirtual #47                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      24: aload_0
      25: getfield      #16                 // Field p:I
      28: invokevirtual #50                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      31: ldc           #54                 // String , r=
      33: invokevirtual #47                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      36: aload_0
      37: getfield      #19                 // Field r:I
      40: invokevirtual #50                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      43: bipush        41
      45: invokevirtual #57                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      48: invokevirtual #59                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      51: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #13                 // Field time:I
       4: invokestatic  #65                 // Method java/lang/Integer.hashCode:(I)I
       7: istore_1
       8: iload_1
       9: bipush        31
      11: imul
      12: aload_0
      13: getfield      #16                 // Field p:I
      16: invokestatic  #65                 // Method java/lang/Integer.hashCode:(I)I
      19: iadd
      20: istore_1
      21: iload_1
      22: bipush        31
      24: imul
      25: aload_0
      26: getfield      #19                 // Field r:I
      29: invokestatic  #65                 // Method java/lang/Integer.hashCode:(I)I
      32: iadd
      33: istore_1
      34: iload_1
      35: ireturn

  public boolean equals(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: if_acmpne     7
       5: iconst_1
       6: ireturn
       7: aload_1
       8: instanceof    #2                  // class facebook/y2020/round3/CKt$solve$Measurement
      11: ifne          16
      14: iconst_0
      15: ireturn
      16: aload_1
      17: checkcast     #2                  // class facebook/y2020/round3/CKt$solve$Measurement
      20: astore_2
      21: aload_0
      22: getfield      #13                 // Field time:I
      25: aload_2
      26: getfield      #13                 // Field time:I
      29: if_icmpeq     34
      32: iconst_0
      33: ireturn
      34: aload_0
      35: getfield      #16                 // Field p:I
      38: aload_2
      39: getfield      #16                 // Field p:I
      42: if_icmpeq     47
      45: iconst_0
      46: ireturn
      47: aload_0
      48: getfield      #19                 // Field r:I
      51: aload_2
      52: getfield      #19                 // Field r:I
      55: if_icmpeq     60
      58: iconst_0
      59: ireturn
      60: iconst_1
      61: ireturn
}

Compiled from "c.kt"
public final class facebook.y2020.round3.CKt {
  private static final java.lang.String solve();
    Code:
       0: invokestatic  #10                 // Method readInts:()Ljava/util/List;
       3: astore_0
       4: aload_0
       5: iconst_0
       6: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      11: checkcast     #18                 // class java/lang/Number
      14: invokevirtual #22                 // Method java/lang/Number.intValue:()I
      17: istore_1
      18: aload_0
      19: iconst_1
      20: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      25: checkcast     #18                 // class java/lang/Number
      28: invokevirtual #22                 // Method java/lang/Number.intValue:()I
      31: istore_2
      32: new           #24                 // class java/util/ArrayList
      35: dup
      36: iload_1
      37: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
      40: astore        4
      42: iconst_0
      43: istore        5
      45: iload         5
      47: iload_1
      48: if_icmpge     129
      51: iload         5
      53: istore        6
      55: aload         4
      57: iload         6
      59: istore        7
      61: astore        18
      63: iconst_0
      64: istore        8
      66: invokestatic  #10                 // Method readInts:()Ljava/util/List;
      69: astore        9
      71: aload         9
      73: iconst_0
      74: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      79: checkcast     #18                 // class java/lang/Number
      82: invokevirtual #22                 // Method java/lang/Number.intValue:()I
      85: istore        10
      87: aload         9
      89: iconst_1
      90: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      95: checkcast     #18                 // class java/lang/Number
      98: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     101: istore        11
     103: new           #30                 // class facebook/y2020/round3/CKt$solve$Measurement
     106: dup
     107: iload         7
     109: iload         10
     111: iload         11
     113: invokespecial #33                 // Method facebook/y2020/round3/CKt$solve$Measurement."<init>":(III)V
     116: aload         18
     118: swap
     119: invokevirtual #37                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     122: pop
     123: iinc          5, 1
     126: goto          45
     129: aload         4
     131: checkcast     #12                 // class java/util/List
     134: astore_3
     135: aload_3
     136: checkcast     #39                 // class java/lang/Iterable
     139: astore        5
     141: iconst_0
     142: istore        6
     144: aload         5
     146: astore        7
     148: new           #24                 // class java/util/ArrayList
     151: dup
     152: aload         5
     154: bipush        10
     156: invokestatic  #45                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     159: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     162: checkcast     #47                 // class java/util/Collection
     165: astore        8
     167: iconst_0
     168: istore        9
     170: aload         7
     172: invokeinterface #51,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     177: astore        10
     179: aload         10
     181: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     186: ifeq          232
     189: aload         10
     191: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     196: astore        11
     198: aload         8
     200: aload         11
     202: checkcast     #30                 // class facebook/y2020/round3/CKt$solve$Measurement
     205: astore        12
     207: astore        18
     209: iconst_0
     210: istore        13
     212: aload         12
     214: invokevirtual #64                 // Method facebook/y2020/round3/CKt$solve$Measurement.getP:()I
     217: invokestatic  #70                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     220: aload         18
     222: swap
     223: invokeinterface #71,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     228: pop
     229: goto          179
     232: aload         8
     234: checkcast     #12                 // class java/util/List
     237: nop
     238: checkcast     #39                 // class java/lang/Iterable
     241: invokestatic  #75                 // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     244: checkcast     #39                 // class java/lang/Iterable
     247: invokestatic  #79                 // Method kotlin/collections/CollectionsKt.sorted:(Ljava/lang/Iterable;)Ljava/util/List;
     250: astore        4
     252: iconst_0
     253: istore        6
     255: iload_2
     256: iconst_1
     257: iadd
     258: istore        7
     260: iload         7
     262: anewarray     #81                 // class kotlin/Pair
     265: astore        8
     267: iload         6
     269: iload         7
     271: if_icmpge     302
     274: iload         6
     276: istore        9
     278: aload         8
     280: iload         9
     282: iload_1
     283: iconst_1
     284: iadd
     285: invokestatic  #70                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     288: iconst_0
     289: invokestatic  #70                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     292: invokestatic  #87                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     295: aastore
     296: iinc          6, 1
     299: goto          267
     302: aload         8
     304: astore        5
     306: aload         5
     308: iconst_0
     309: iconst_0
     310: invokestatic  #70                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     313: iconst_0
     314: invokestatic  #70                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     317: invokestatic  #87                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     320: aastore
     321: aload         4
     323: invokeinterface #88,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     328: astore        6
     330: aload         6
     332: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     337: ifeq          749
     340: aload         6
     342: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     347: checkcast     #18                 // class java/lang/Number
     350: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     353: istore        7
     355: aload_3
     356: checkcast     #39                 // class java/lang/Iterable
     359: astore        9
     361: iconst_0
     362: istore        10
     364: aload         9
     366: astore        11
     368: new           #24                 // class java/util/ArrayList
     371: dup
     372: invokespecial #91                 // Method java/util/ArrayList."<init>":()V
     375: checkcast     #47                 // class java/util/Collection
     378: astore        12
     380: iconst_0
     381: istore        13
     383: aload         11
     385: invokeinterface #51,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     390: astore        14
     392: aload         14
     394: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     399: ifeq          452
     402: aload         14
     404: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     409: astore        15
     411: aload         15
     413: checkcast     #30                 // class facebook/y2020/round3/CKt$solve$Measurement
     416: astore        16
     418: iconst_0
     419: istore        17
     421: aload         16
     423: invokevirtual #64                 // Method facebook/y2020/round3/CKt$solve$Measurement.getP:()I
     426: iload         7
     428: if_icmpne     435
     431: iconst_1
     432: goto          436
     435: iconst_0
     436: ifeq          392
     439: aload         12
     441: aload         15
     443: invokeinterface #71,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     448: pop
     449: goto          392
     452: aload         12
     454: checkcast     #12                 // class java/util/List
     457: nop
     458: astore        8
     460: iconst_0
     461: istore        10
     463: iload_2
     464: iconst_1
     465: iadd
     466: istore        11
     468: iload         11
     470: anewarray     #81                 // class kotlin/Pair
     473: astore        12
     475: iload         10
     477: iload         11
     479: if_icmpge     510
     482: iload         10
     484: istore        13
     486: aload         12
     488: iload         13
     490: iload_1
     491: iconst_1
     492: iadd
     493: invokestatic  #70                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     496: iconst_0
     497: invokestatic  #70                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     500: invokestatic  #87                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     503: aastore
     504: iinc          10, 1
     507: goto          475
     510: aload         12
     512: astore        9
     514: iconst_0
     515: istore        10
     517: aload         8
     519: invokeinterface #94,  1           // InterfaceMethod java/util/List.size:()I
     524: istore        11
     526: iload         10
     528: iload         11
     530: if_icmpgt     742
     533: iload         10
     535: ifle          559
     538: aload         8
     540: iload         10
     542: iconst_1
     543: isub
     544: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     549: checkcast     #30                 // class facebook/y2020/round3/CKt$solve$Measurement
     552: invokevirtual #97                 // Method facebook/y2020/round3/CKt$solve$Measurement.getR:()I
     555: iconst_1
     556: if_icmpeq     729
     559: iconst_0
     560: istore        12
     562: iconst_0
     563: istore        13
     565: aload         8
     567: checkcast     #47                 // class java/util/Collection
     570: invokeinterface #98,  1           // InterfaceMethod java/util/Collection.size:()I
     575: istore        14
     577: iload         13
     579: iload         14
     581: if_icmpge     647
     584: iload         13
     586: iload         10
     588: if_icmpge     613
     591: aload         8
     593: iload         13
     595: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     600: checkcast     #30                 // class facebook/y2020/round3/CKt$solve$Measurement
     603: invokevirtual #97                 // Method facebook/y2020/round3/CKt$solve$Measurement.getR:()I
     606: iconst_1
     607: if_icmpne     613
     610: iinc          12, 1
     613: iload         13
     615: iload         10
     617: if_icmplt     641
     620: aload         8
     622: iload         13
     624: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     629: checkcast     #30                 // class facebook/y2020/round3/CKt$solve$Measurement
     632: invokevirtual #97                 // Method facebook/y2020/round3/CKt$solve$Measurement.getR:()I
     635: ifne          641
     638: iinc          12, 1
     641: iinc          13, 1
     644: goto          577
     647: iload         10
     649: ifne          656
     652: iconst_m1
     653: goto          673
     656: aload         8
     658: iload         10
     660: iconst_1
     661: isub
     662: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     667: checkcast     #30                 // class facebook/y2020/round3/CKt$solve$Measurement
     670: invokevirtual #101                // Method facebook/y2020/round3/CKt$solve$Measurement.getTime:()I
     673: istore        13
     675: iload         10
     677: aload         8
     679: invokeinterface #94,  1           // InterfaceMethod java/util/List.size:()I
     684: if_icmpne     691
     687: iload_1
     688: goto          706
     691: aload         8
     693: iload         10
     695: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     700: checkcast     #30                 // class facebook/y2020/round3/CKt$solve$Measurement
     703: invokevirtual #101                // Method facebook/y2020/round3/CKt$solve$Measurement.getTime:()I
     706: istore        14
     708: iconst_0
     709: istore        15
     711: iload         15
     713: iload_2
     714: if_icmpgt     729
     717: iload         15
     719: iload_2
     720: if_icmpeq     729
     723: iinc          15, 1
     726: goto          717
     729: iload         10
     731: iload         11
     733: if_icmpeq     742
     736: iinc          10, 1
     739: goto          533
     742: aload         9
     744: astore        5
     746: goto          330
     749: ldc           #103                // String
     751: areturn

  public static final void main();
    Code:
       0: invokestatic  #145                // Method readInt:()I
       3: istore_0
       4: iconst_0
       5: istore_1
       6: iload_1
       7: iload_0
       8: if_icmpge     61
      11: iload_1
      12: istore_2
      13: iconst_0
      14: istore_3
      15: new           #147                // class java/lang/StringBuilder
      18: dup
      19: invokespecial #148                // Method java/lang/StringBuilder."<init>":()V
      22: ldc           #150                // String Case #
      24: invokevirtual #154                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      27: iload_2
      28: iconst_1
      29: iadd
      30: invokevirtual #157                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      33: ldc           #159                // String :
      35: invokevirtual #154                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      38: invokestatic  #161                // Method solve:()Ljava/lang/String;
      41: invokevirtual #154                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      44: invokevirtual #164                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      47: getstatic     #170                // Field java/lang/System.out:Ljava/io/PrintStream;
      50: swap
      51: invokevirtual #176                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      54: nop
      55: iinc          1, 1
      58: goto          6
      61: return

  private static final java.lang.String readLn();
    Code:
       0: invokestatic  #183                // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
       3: dup
       4: invokestatic  #188                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
       7: areturn

  private static final int readInt();
    Code:
       0: invokestatic  #190                // Method readLn:()Ljava/lang/String;
       3: invokestatic  #194                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
       6: ireturn

  private static final java.util.List<java.lang.String> readStrings();
    Code:
       0: invokestatic  #190                // Method readLn:()Ljava/lang/String;
       3: checkcast     #198                // class java/lang/CharSequence
       6: iconst_1
       7: anewarray     #200                // class java/lang/String
      10: astore_0
      11: aload_0
      12: iconst_0
      13: ldc           #202                // String
      15: aastore
      16: aload_0
      17: iconst_0
      18: iconst_0
      19: bipush        6
      21: aconst_null
      22: invokestatic  #208                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      25: areturn

  private static final java.util.List<java.lang.Integer> readInts();
    Code:
       0: invokestatic  #211                // Method readStrings:()Ljava/util/List;
       3: checkcast     #39                 // class java/lang/Iterable
       6: astore_0
       7: iconst_0
       8: istore_1
       9: aload_0
      10: astore_2
      11: new           #24                 // class java/util/ArrayList
      14: dup
      15: aload_0
      16: bipush        10
      18: invokestatic  #45                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #47                 // class java/util/Collection
      27: astore_3
      28: iconst_0
      29: istore        4
      31: aload_2
      32: invokeinterface #51,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore        5
      39: aload         5
      41: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          92
      49: aload         5
      51: invokeinterface #61,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      56: astore        6
      58: aload_3
      59: aload         6
      61: checkcast     #200                // class java/lang/String
      64: astore        7
      66: astore        9
      68: iconst_0
      69: istore        8
      71: aload         7
      73: invokestatic  #194                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      76: nop
      77: invokestatic  #70                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      80: aload         9
      82: swap
      83: invokeinterface #71,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      88: pop
      89: goto          39
      92: aload_3
      93: checkcast     #12                 // class java/util/List
      96: nop
      97: areturn

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #216                // Method main:()V
       3: return
}


package facebook.y2020.round3

import java.lang.StringBuilder

private fun solve(): String {
	var k = readInt() / 2
	val main = minOf(100, k + 2)
	var vertices = main
	val edges = mutableListOf<Pair<Int, Int>>()
	for (i in 1 until main) {
		edges.add(i - 1 to i)
	}
	k -= main - 2
	for (i in 1..main - 2) {
		var deg = 2
		while (true) {
			val next = k + deg * (deg - 1) / 2 - deg * (deg + 1) / 2
			if (next < 0) break
			edges.add(i to vertices)
			vertices++
			deg++
			k = next
		}
	}
	var last = 0
	while (k > 0) {
		edges.add(last to vertices)
		vertices++
		last = vertices
		k--
	}
	if (k != 0) error("" + k)
	val sb = StringBuilder("$vertices ${edges.size}")
	for ((a, b) in edges) {
		sb.append("\n${a + 1} ${b + 1}")
	}
	return sb.toString()
}

fun main() = repeat(readInt()) { println("Case #${it + 1}: ${solve()}") }

private fun readLn() = readLine()!!
private fun readInt() = readLn().toInt()
private fun readStrings() = readLn().split(" ")
private fun readInts() = readStrings().map { it.toInt() }

Compiled from "a.kt"
public final class facebook.y2020.round3.AKt {
  private static final java.lang.String solve();
    Code:
       0: invokestatic  #10                 // Method readInt:()I
       3: iconst_2
       4: idiv
       5: istore_0
       6: bipush        100
       8: iload_0
       9: iconst_2
      10: iadd
      11: invokestatic  #16                 // Method java/lang/Math.min:(II)I
      14: istore_1
      15: iload_1
      16: istore_2
      17: new           #18                 // class java/util/ArrayList
      20: dup
      21: invokespecial #22                 // Method java/util/ArrayList."<init>":()V
      24: checkcast     #24                 // class java/util/List
      27: astore_3
      28: iconst_1
      29: istore        4
      31: iload         4
      33: iload_1
      34: if_icmpge     65
      37: aload_3
      38: iload         4
      40: iconst_1
      41: isub
      42: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      45: iload         4
      47: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      50: invokestatic  #36                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      53: invokeinterface #40,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      58: pop
      59: iinc          4, 1
      62: goto          31
      65: iload_0
      66: iload_1
      67: iconst_2
      68: isub
      69: isub
      70: istore_0
      71: iconst_1
      72: istore        4
      74: iload_1
      75: iconst_2
      76: isub
      77: istore        5
      79: iload         4
      81: iload         5
      83: if_icmpgt     162
      86: iconst_2
      87: istore        6
      89: nop
      90: iload_0
      91: iload         6
      93: iload         6
      95: iconst_1
      96: isub
      97: imul
      98: iconst_2
      99: idiv
     100: iadd
     101: iload         6
     103: iload         6
     105: iconst_1
     106: iadd
     107: imul
     108: iconst_2
     109: idiv
     110: isub
     111: istore        7
     113: iload         7
     115: iflt          149
     118: aload_3
     119: iload         4
     121: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     124: iload_2
     125: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     128: invokestatic  #36                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     131: invokeinterface #40,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     136: pop
     137: iinc          2, 1
     140: iinc          6, 1
     143: iload         7
     145: istore_0
     146: goto          89
     149: iload         4
     151: iload         5
     153: if_icmpeq     162
     156: iinc          4, 1
     159: goto          86
     162: iconst_0
     163: istore        4
     165: iload_0
     166: ifle          200
     169: aload_3
     170: iload         4
     172: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     175: iload_2
     176: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     179: invokestatic  #36                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     182: invokeinterface #40,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     187: pop
     188: iinc          2, 1
     191: iload_2
     192: istore        4
     194: iinc          0, -1
     197: goto          165
     200: iload_0
     201: ifeq          234
     204: new           #42                 // class java/lang/IllegalStateException
     207: dup
     208: new           #44                 // class java/lang/StringBuilder
     211: dup
     212: invokespecial #45                 // Method java/lang/StringBuilder."<init>":()V
     215: ldc           #47                 // String
     217: invokevirtual #51                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     220: iload_0
     221: invokevirtual #54                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     224: invokevirtual #57                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     227: invokevirtual #58                 // Method java/lang/Object.toString:()Ljava/lang/String;
     230: invokespecial #61                 // Method java/lang/IllegalStateException."<init>":(Ljava/lang/String;)V
     233: athrow
     234: new           #44                 // class java/lang/StringBuilder
     237: dup
     238: new           #44                 // class java/lang/StringBuilder
     241: dup
     242: invokespecial #45                 // Method java/lang/StringBuilder."<init>":()V
     245: iload_2
     246: invokevirtual #54                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     249: bipush        32
     251: invokevirtual #64                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     254: aload_3
     255: invokeinterface #67,  1           // InterfaceMethod java/util/List.size:()I
     260: invokevirtual #54                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     263: invokevirtual #57                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     266: invokespecial #68                 // Method java/lang/StringBuilder."<init>":(Ljava/lang/String;)V
     269: astore        5
     271: aload_3
     272: invokeinterface #72,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     277: astore        6
     279: aload         6
     281: invokeinterface #78,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     286: ifeq          370
     289: aload         6
     291: invokeinterface #82,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     296: checkcast     #84                 // class kotlin/Pair
     299: astore        7
     301: aload         7
     303: invokevirtual #87                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
     306: checkcast     #89                 // class java/lang/Number
     309: invokevirtual #92                 // Method java/lang/Number.intValue:()I
     312: istore        8
     314: aload         7
     316: invokevirtual #95                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
     319: checkcast     #89                 // class java/lang/Number
     322: invokevirtual #92                 // Method java/lang/Number.intValue:()I
     325: istore        9
     327: aload         5
     329: new           #44                 // class java/lang/StringBuilder
     332: dup
     333: invokespecial #45                 // Method java/lang/StringBuilder."<init>":()V
     336: bipush        10
     338: invokevirtual #64                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     341: iload         8
     343: iconst_1
     344: iadd
     345: invokevirtual #54                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     348: bipush        32
     350: invokevirtual #64                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     353: iload         9
     355: iconst_1
     356: iadd
     357: invokevirtual #54                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     360: invokevirtual #57                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     363: invokevirtual #51                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     366: pop
     367: goto          279
     370: aload         5
     372: invokevirtual #57                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     375: dup
     376: ldc           #97                 // String toString(...)
     378: invokestatic  #103                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     381: areturn

  public static final void main();
    Code:
       0: invokestatic  #10                 // Method readInt:()I
       3: istore_0
       4: iconst_0
       5: istore_1
       6: iload_1
       7: iload_0
       8: if_icmpge     61
      11: iload_1
      12: istore_2
      13: iconst_0
      14: istore_3
      15: new           #44                 // class java/lang/StringBuilder
      18: dup
      19: invokespecial #45                 // Method java/lang/StringBuilder."<init>":()V
      22: ldc           #118                // String Case #
      24: invokevirtual #51                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      27: iload_2
      28: iconst_1
      29: iadd
      30: invokevirtual #54                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      33: ldc           #120                // String :
      35: invokevirtual #51                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      38: invokestatic  #122                // Method solve:()Ljava/lang/String;
      41: invokevirtual #51                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      44: invokevirtual #57                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      47: getstatic     #128                // Field java/lang/System.out:Ljava/io/PrintStream;
      50: swap
      51: invokevirtual #134                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      54: nop
      55: iinc          1, 1
      58: goto          6
      61: return

  private static final java.lang.String readLn();
    Code:
       0: invokestatic  #142                // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
       3: dup
       4: invokestatic  #145                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
       7: areturn

  private static final int readInt();
    Code:
       0: invokestatic  #147                // Method readLn:()Ljava/lang/String;
       3: invokestatic  #151                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
       6: ireturn

  private static final java.util.List<java.lang.String> readStrings();
    Code:
       0: invokestatic  #147                // Method readLn:()Ljava/lang/String;
       3: checkcast     #156                // class java/lang/CharSequence
       6: iconst_1
       7: anewarray     #158                // class java/lang/String
      10: astore_0
      11: aload_0
      12: iconst_0
      13: ldc           #160                // String
      15: aastore
      16: aload_0
      17: iconst_0
      18: iconst_0
      19: bipush        6
      21: aconst_null
      22: invokestatic  #166                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      25: areturn

  private static final java.util.List<java.lang.Integer> readInts();
    Code:
       0: invokestatic  #170                // Method readStrings:()Ljava/util/List;
       3: checkcast     #172                // class java/lang/Iterable
       6: astore_0
       7: iconst_0
       8: istore_1
       9: aload_0
      10: astore_2
      11: new           #18                 // class java/util/ArrayList
      14: dup
      15: aload_0
      16: bipush        10
      18: invokestatic  #178                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #181                // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #183                // class java/util/Collection
      27: astore_3
      28: iconst_0
      29: istore        4
      31: aload_2
      32: invokeinterface #184,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore        5
      39: aload         5
      41: invokeinterface #78,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          92
      49: aload         5
      51: invokeinterface #82,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      56: astore        6
      58: aload_3
      59: aload         6
      61: checkcast     #158                // class java/lang/String
      64: astore        7
      66: astore        9
      68: iconst_0
      69: istore        8
      71: aload         7
      73: invokestatic  #151                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      76: nop
      77: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      80: aload         9
      82: swap
      83: invokeinterface #185,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      88: pop
      89: goto          39
      92: aload_3
      93: checkcast     #24                 // class java/util/List
      96: nop
      97: areturn

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #199                // Method main:()V
       3: return
}


package facebook.y2020.round2

private fun solve(): DoubleArray {
	val s = readStrings()
	val n = s[0].toInt()
	val p = s[1].toDouble()
	var a = DoubleArray(2) { 1.0 }
	for (m in 3..n) {
		val pairs = m * (m - 1L) / 2
		val b = DoubleArray(m) { i ->
			val smaller = a.getOrElse(i - 1) { 0.0 }
			val same = a.getOrElse(i) { 0.0 }
			val r = 1 + (
					(i * (i - 1L) / 2) * smaller +
					(i) * (p * smaller) +
					(m - 1 - i) * ((1 - p) * same) +
					(i * (m - 1L - i)) * (p * smaller + (1 - p) * same) +
					(m - 1L - i) * (m - 2L - i) / 2 * same
					) / pairs
			r
		}
		a = b
	}
	return a
}

fun main() = repeat(readInt()) { println("Case #${it + 1}:\n${solve().joinToString("\n")}") }

private fun readLn() = readLine()!!
private fun readInt() = readLn().toInt()
private fun readStrings() = readLn().split(" ")

Compiled from "b.kt"
public final class facebook.y2020.round2.BKt {
  private static final double[] solve();
    Code:
       0: invokestatic  #10                 // Method readStrings:()Ljava/util/List;
       3: astore_0
       4: aload_0
       5: iconst_0
       6: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      11: checkcast     #18                 // class java/lang/String
      14: invokestatic  #24                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      17: istore_1
      18: aload_0
      19: iconst_1
      20: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      25: checkcast     #18                 // class java/lang/String
      28: invokestatic  #30                 // Method java/lang/Double.parseDouble:(Ljava/lang/String;)D
      31: dstore_2
      32: iconst_0
      33: istore        5
      35: iconst_2
      36: newarray       double
      38: astore        6
      40: iload         5
      42: iconst_2
      43: if_icmpge     62
      46: iload         5
      48: istore        7
      50: aload         6
      52: iload         7
      54: dconst_1
      55: dastore
      56: iinc          5, 1
      59: goto          40
      62: aload         6
      64: astore        4
      66: iconst_3
      67: istore        5
      69: iload         5
      71: iload_1
      72: if_icmpgt     382
      75: iload         5
      77: i2l
      78: iload         5
      80: i2l
      81: lconst_1
      82: lsub
      83: lmul
      84: iconst_2
      85: i2l
      86: ldiv
      87: lstore        6
      89: iconst_0
      90: istore        9
      92: iload         5
      94: istore        10
      96: iload         10
      98: newarray       double
     100: astore        11
     102: iload         9
     104: iload         10
     106: if_icmpge     362
     109: iload         9
     111: istore        12
     113: aload         11
     115: iload         12
     117: aload         4
     119: astore        15
     121: iload         12
     123: iconst_1
     124: isub
     125: istore        16
     127: iconst_0
     128: iload         16
     130: if_icmpgt     149
     133: iload         16
     135: aload         15
     137: arraylength
     138: if_icmpge     145
     141: iconst_1
     142: goto          150
     145: iconst_0
     146: goto          150
     149: iconst_0
     150: ifeq          161
     153: aload         15
     155: iload         16
     157: daload
     158: goto          182
     161: iload         16
     163: istore        17
     165: istore        21
     167: astore        20
     169: iconst_0
     170: istore        18
     172: dconst_0
     173: dstore        22
     175: aload         20
     177: iload         21
     179: dload         22
     181: nop
     182: dstore        13
     184: aload         4
     186: astore        17
     188: iconst_0
     189: iload         12
     191: if_icmpgt     210
     194: iload         12
     196: aload         17
     198: arraylength
     199: if_icmpge     206
     202: iconst_1
     203: goto          211
     206: iconst_0
     207: goto          211
     210: iconst_0
     211: ifeq          222
     214: aload         17
     216: iload         12
     218: daload
     219: goto          243
     222: iload         12
     224: istore        18
     226: istore        21
     228: astore        20
     230: iconst_0
     231: istore        19
     233: dconst_0
     234: dstore        22
     236: aload         20
     238: iload         21
     240: dload         22
     242: nop
     243: dstore        15
     245: iconst_1
     246: i2d
     247: iload         12
     249: i2l
     250: iload         12
     252: i2l
     253: lconst_1
     254: lsub
     255: lmul
     256: iconst_2
     257: i2l
     258: ldiv
     259: l2d
     260: dload         13
     262: dmul
     263: iload         12
     265: i2d
     266: dload_2
     267: dload         13
     269: dmul
     270: dmul
     271: dadd
     272: iload         5
     274: iconst_1
     275: isub
     276: iload         12
     278: isub
     279: i2d
     280: iconst_1
     281: i2d
     282: dload_2
     283: dsub
     284: dload         15
     286: dmul
     287: dmul
     288: dadd
     289: iload         12
     291: i2l
     292: iload         5
     294: i2l
     295: lconst_1
     296: lsub
     297: iload         12
     299: i2l
     300: lsub
     301: lmul
     302: l2d
     303: dload_2
     304: dload         13
     306: dmul
     307: iconst_1
     308: i2d
     309: dload_2
     310: dsub
     311: dload         15
     313: dmul
     314: dadd
     315: dmul
     316: dadd
     317: iload         5
     319: i2l
     320: lconst_1
     321: lsub
     322: iload         12
     324: i2l
     325: lsub
     326: iload         5
     328: i2l
     329: ldc2_w        #31                 // long 2l
     332: lsub
     333: iload         12
     335: i2l
     336: lsub
     337: lmul
     338: iconst_2
     339: i2l
     340: ldiv
     341: l2d
     342: dload         15
     344: dmul
     345: dadd
     346: lload         6
     348: l2d
     349: ddiv
     350: dadd
     351: dstore        17
     353: dload         17
     355: dastore
     356: iinc          9, 1
     359: goto          102
     362: aload         11
     364: astore        8
     366: aload         8
     368: astore        4
     370: iload         5
     372: iload_1
     373: if_icmpeq     382
     376: iinc          5, 1
     379: goto          75
     382: aload         4
     384: areturn

  public static final void main();
    Code:
       0: invokestatic  #57                 // Method readInt:()I
       3: istore_0
       4: iconst_0
       5: istore_1
       6: iload_1
       7: iload_0
       8: if_icmpge     77
      11: iload_1
      12: istore_2
      13: iconst_0
      14: istore_3
      15: new           #59                 // class java/lang/StringBuilder
      18: dup
      19: invokespecial #62                 // Method java/lang/StringBuilder."<init>":()V
      22: ldc           #64                 // String Case #
      24: invokevirtual #68                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      27: iload_2
      28: iconst_1
      29: iadd
      30: invokevirtual #71                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      33: ldc           #73                 // String :\n
      35: invokevirtual #68                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      38: invokestatic  #75                 // Method solve:()[D
      41: ldc           #77                 // String \n
      43: checkcast     #79                 // class java/lang/CharSequence
      46: aconst_null
      47: aconst_null
      48: iconst_0
      49: aconst_null
      50: aconst_null
      51: bipush        62
      53: aconst_null
      54: invokestatic  #85                 // Method kotlin/collections/ArraysKt.joinToString$default:([DLjava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String;
      57: invokevirtual #68                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      60: invokevirtual #89                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      63: getstatic     #95                 // Field java/lang/System.out:Ljava/io/PrintStream;
      66: swap
      67: invokevirtual #101                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      70: nop
      71: iinc          1, 1
      74: goto          6
      77: return

  private static final java.lang.String readLn();
    Code:
       0: invokestatic  #108                // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
       3: dup
       4: invokestatic  #113                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
       7: areturn

  private static final int readInt();
    Code:
       0: invokestatic  #115                // Method readLn:()Ljava/lang/String;
       3: invokestatic  #24                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
       6: ireturn

  private static final java.util.List<java.lang.String> readStrings();
    Code:
       0: invokestatic  #115                // Method readLn:()Ljava/lang/String;
       3: checkcast     #79                 // class java/lang/CharSequence
       6: iconst_1
       7: anewarray     #18                 // class java/lang/String
      10: astore_0
      11: aload_0
      12: iconst_0
      13: ldc           #118                // String
      15: aastore
      16: aload_0
      17: iconst_0
      18: iconst_0
      19: bipush        6
      21: aconst_null
      22: invokestatic  #124                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      25: areturn

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #127                // Method main:()V
       3: return
}