package io.hsar.practice3

/*
https://codeforces.com/contest/1298/problem/E

Input:
10 4
5 4 1 5 4 3 7 1 2 5
4 6
2 1
10 8
3 5

Output:
5 4 0 5 3 3 9 0 2 5
 */
fun findNumberOfValidMentees(skillsLookup: List<Pair<Int, Int>>, quarrelsLookup: Map<Int, Set<Int>>, skillLevel: Int, index: Int): Int {
    var mentees = 0
    skillsLookup
            .forEach { (otherIndex, otherSkillLevel) ->
                if (otherSkillLevel < skillLevel) {
                    if (!quarrelsLookup[index]!!.contains(otherIndex))  // not in quarrel
                    {
                        mentees++
                    }
                } else {
                    return mentees
                }
            }
    return mentees
}

fun main() {
    val (numberOfProgrammers, numberOfQuarrels) = readLine()!!
            .split(" ")
            .map { it.toInt() }
            .let { splitArray ->
                splitArray[0] to splitArray[1]
            }
    val skillLevels = readLine()!!
            .split(" ")
            .map { it.toInt() }
    val quarrels = (0 until numberOfQuarrels)
            .map {
                readLine()!!
                        .split(" ")
                        .map { it.toInt() }
            }

    val quarrelsLookup = List(numberOfProgrammers)
    { index -> index + 1 to mutableSetOf<Int>() }
            .toMap()
    // fill in quarrels
    quarrels.forEach { quarrel ->
        val personA = quarrel[0]
        val personB = quarrel[1]
        quarrelsLookup[personA]!!.add(personB)
        quarrelsLookup[personB]!!.add(personA)
    }
    val skillsLookup = skillLevels
            .mapIndexed { index, skillLevel ->
                index + 1 to skillLevel
            }
            .sortedBy { (_, skillLevel) -> skillLevel }

    val results = skillLevels
            .mapIndexed { index, skillLevel ->
                findNumberOfValidMentees(skillsLookup, quarrelsLookup, skillLevel, index + 1)
            }

    println(results.joinToString(" "))
}

Compiled from "ProblemE.kt"
public final class io.hsar.practice3.ProblemEKt {
  public static final int findNumberOfValidMentees(java.util.List<kotlin.Pair<java.lang.Integer, java.lang.Integer>>, java.util.Map<java.lang.Integer, ? extends java.util.Set<java.lang.Integer>>, int, int);
    Code:
       0: aload_0
       1: ldc           #10                 // String skillsLookup
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #18                 // String quarrelsLookup
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: iconst_0
      13: istore        4
      15: aload_0
      16: checkcast     #20                 // class java/lang/Iterable
      19: astore        5
      21: nop
      22: iconst_0
      23: istore        6
      25: aload         5
      27: invokeinterface #24,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      32: astore        7
      34: aload         7
      36: invokeinterface #30,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      41: ifeq          142
      44: aload         7
      46: invokeinterface #34,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      51: astore        8
      53: aload         8
      55: checkcast     #36                 // class kotlin/Pair
      58: astore        9
      60: iconst_0
      61: istore        10
      63: aload         9
      65: invokevirtual #39                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
      68: checkcast     #41                 // class java/lang/Number
      71: invokevirtual #45                 // Method java/lang/Number.intValue:()I
      74: istore        11
      76: aload         9
      78: invokevirtual #48                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
      81: checkcast     #41                 // class java/lang/Number
      84: invokevirtual #45                 // Method java/lang/Number.intValue:()I
      87: istore        12
      89: iload         12
      91: iload_2
      92: if_icmpge     134
      95: aload_1
      96: iload_3
      97: invokestatic  #54                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     100: invokeinterface #60,  2           // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     105: dup
     106: invokestatic  #64                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     109: checkcast     #66                 // class java/util/Set
     112: iload         11
     114: invokestatic  #54                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     117: invokeinterface #70,  2           // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     122: ifne          137
     125: iload         4
     127: iconst_1
     128: iadd
     129: istore        4
     131: goto          137
     134: iload         4
     136: ireturn
     137: nop
     138: nop
     139: goto          34
     142: nop
     143: iload         4
     145: ireturn

  public static final void main();
    Code:
       0: invokestatic  #94                 // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
       3: dup
       4: invokestatic  #64                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
       7: checkcast     #96                 // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #98                 // class java/lang/String
      14: astore_1
      15: aload_1
      16: iconst_0
      17: ldc           #100                // String
      19: aastore
      20: aload_1
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #106                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: checkcast     #20                 // class java/lang/Iterable
      32: astore_1
      33: nop
      34: iconst_0
      35: istore_2
      36: aload_1
      37: astore_3
      38: new           #108                // class java/util/ArrayList
      41: dup
      42: aload_1
      43: bipush        10
      45: invokestatic  #114                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      48: invokespecial #118                // Method java/util/ArrayList."<init>":(I)V
      51: checkcast     #120                // class java/util/Collection
      54: astore        4
      56: iconst_0
      57: istore        5
      59: aload_3
      60: invokeinterface #24,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      65: astore        6
      67: aload         6
      69: invokeinterface #30,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      74: ifeq          121
      77: aload         6
      79: invokeinterface #34,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      84: astore        7
      86: aload         4
      88: aload         7
      90: checkcast     #98                 // class java/lang/String
      93: astore        8
      95: astore        24
      97: iconst_0
      98: istore        9
     100: aload         8
     102: invokestatic  #124                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     105: nop
     106: invokestatic  #54                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     109: aload         24
     111: swap
     112: invokeinterface #127,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     117: pop
     118: goto          67
     121: aload         4
     123: checkcast     #86                 // class java/util/List
     126: nop
     127: astore_2
     128: iconst_0
     129: istore_3
     130: aload_2
     131: iconst_0
     132: invokeinterface #130,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     137: aload_2
     138: iconst_1
     139: invokeinterface #130,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     144: invokestatic  #136                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     147: nop
     148: astore_0
     149: aload_0
     150: invokevirtual #39                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
     153: checkcast     #41                 // class java/lang/Number
     156: invokevirtual #45                 // Method java/lang/Number.intValue:()I
     159: istore_1
     160: aload_0
     161: invokevirtual #48                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
     164: checkcast     #41                 // class java/lang/Number
     167: invokevirtual #45                 // Method java/lang/Number.intValue:()I
     170: istore_2
     171: invokestatic  #94                 // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
     174: dup
     175: invokestatic  #64                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     178: checkcast     #96                 // class java/lang/CharSequence
     181: iconst_1
     182: anewarray     #98                 // class java/lang/String
     185: astore        4
     187: aload         4
     189: iconst_0
     190: ldc           #100                // String
     192: aastore
     193: aload         4
     195: iconst_0
     196: iconst_0
     197: bipush        6
     199: aconst_null
     200: invokestatic  #106                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     203: checkcast     #20                 // class java/lang/Iterable
     206: astore        4
     208: nop
     209: iconst_0
     210: istore        5
     212: aload         4
     214: astore        6
     216: new           #108                // class java/util/ArrayList
     219: dup
     220: aload         4
     222: bipush        10
     224: invokestatic  #114                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     227: invokespecial #118                // Method java/util/ArrayList."<init>":(I)V
     230: checkcast     #120                // class java/util/Collection
     233: astore        7
     235: iconst_0
     236: istore        8
     238: aload         6
     240: invokeinterface #24,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     245: astore        9
     247: aload         9
     249: invokeinterface #30,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     254: ifeq          301
     257: aload         9
     259: invokeinterface #34,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     264: astore        10
     266: aload         7
     268: aload         10
     270: checkcast     #98                 // class java/lang/String
     273: astore        11
     275: astore        24
     277: iconst_0
     278: istore        12
     280: aload         11
     282: invokestatic  #124                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     285: nop
     286: invokestatic  #54                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     289: aload         24
     291: swap
     292: invokeinterface #127,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     297: pop
     298: goto          247
     301: aload         7
     303: checkcast     #86                 // class java/util/List
     306: nop
     307: astore_3
     308: iconst_0
     309: iload_2
     310: invokestatic  #142                // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     313: checkcast     #20                 // class java/lang/Iterable
     316: astore        5
     318: nop
     319: iconst_0
     320: istore        6
     322: aload         5
     324: astore        7
     326: new           #108                // class java/util/ArrayList
     329: dup
     330: aload         5
     332: bipush        10
     334: invokestatic  #114                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     337: invokespecial #118                // Method java/util/ArrayList."<init>":(I)V
     340: checkcast     #120                // class java/util/Collection
     343: astore        8
     345: iconst_0
     346: istore        9
     348: aload         7
     350: invokeinterface #24,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     355: astore        10
     357: aload         10
     359: invokeinterface #30,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     364: ifeq          537
     367: aload         10
     369: checkcast     #144                // class kotlin/collections/IntIterator
     372: invokevirtual #147                // Method kotlin/collections/IntIterator.nextInt:()I
     375: istore        11
     377: aload         8
     379: iload         11
     381: istore        12
     383: astore        24
     385: iconst_0
     386: istore        13
     388: invokestatic  #94                 // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
     391: dup
     392: invokestatic  #64                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     395: checkcast     #96                 // class java/lang/CharSequence
     398: iconst_1
     399: anewarray     #98                 // class java/lang/String
     402: astore        14
     404: aload         14
     406: iconst_0
     407: ldc           #100                // String
     409: aastore
     410: aload         14
     412: iconst_0
     413: iconst_0
     414: bipush        6
     416: aconst_null
     417: invokestatic  #106                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     420: checkcast     #20                 // class java/lang/Iterable
     423: astore        14
     425: nop
     426: iconst_0
     427: istore        15
     429: aload         14
     431: astore        16
     433: new           #108                // class java/util/ArrayList
     436: dup
     437: aload         14
     439: bipush        10
     441: invokestatic  #114                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     444: invokespecial #118                // Method java/util/ArrayList."<init>":(I)V
     447: checkcast     #120                // class java/util/Collection
     450: astore        17
     452: iconst_0
     453: istore        18
     455: aload         16
     457: invokeinterface #24,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     462: astore        19
     464: aload         19
     466: invokeinterface #30,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     471: ifeq          518
     474: aload         19
     476: invokeinterface #34,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     481: astore        20
     483: aload         17
     485: aload         20
     487: checkcast     #98                 // class java/lang/String
     490: astore        21
     492: astore        22
     494: iconst_0
     495: istore        23
     497: aload         21
     499: invokestatic  #124                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     502: nop
     503: invokestatic  #54                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     506: aload         22
     508: swap
     509: invokeinterface #127,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     514: pop
     515: goto          464
     518: aload         17
     520: checkcast     #86                 // class java/util/List
     523: nop
     524: nop
     525: aload         24
     527: swap
     528: invokeinterface #127,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     533: pop
     534: goto          357
     537: aload         8
     539: checkcast     #86                 // class java/util/List
     542: nop
     543: astore        4
     545: new           #108                // class java/util/ArrayList
     548: dup
     549: iload_1
     550: invokespecial #118                // Method java/util/ArrayList."<init>":(I)V
     553: astore        6
     555: iconst_0
     556: istore        7
     558: iload         7
     560: iload_1
     561: if_icmpge     612
     564: iload         7
     566: istore        8
     568: aload         6
     570: iload         8
     572: istore        9
     574: astore        24
     576: iconst_0
     577: istore        10
     579: iload         9
     581: iconst_1
     582: iadd
     583: invokestatic  #54                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     586: new           #149                // class java/util/LinkedHashSet
     589: dup
     590: invokespecial #151                // Method java/util/LinkedHashSet."<init>":()V
     593: checkcast     #66                 // class java/util/Set
     596: invokestatic  #136                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     599: aload         24
     601: swap
     602: invokevirtual #152                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     605: pop
     606: iinc          7, 1
     609: goto          558
     612: aload         6
     614: checkcast     #86                 // class java/util/List
     617: checkcast     #20                 // class java/lang/Iterable
     620: invokestatic  #158                // Method kotlin/collections/MapsKt.toMap:(Ljava/lang/Iterable;)Ljava/util/Map;
     623: astore        5
     625: aload         4
     627: checkcast     #20                 // class java/lang/Iterable
     630: astore        6
     632: iconst_0
     633: istore        7
     635: aload         6
     637: invokeinterface #24,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     642: astore        8
     644: aload         8
     646: invokeinterface #30,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     651: ifeq          770
     654: aload         8
     656: invokeinterface #34,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     661: astore        9
     663: aload         9
     665: checkcast     #86                 // class java/util/List
     668: astore        10
     670: iconst_0
     671: istore        11
     673: aload         10
     675: iconst_0
     676: invokeinterface #130,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     681: checkcast     #41                 // class java/lang/Number
     684: invokevirtual #45                 // Method java/lang/Number.intValue:()I
     687: istore        12
     689: aload         10
     691: iconst_1
     692: invokeinterface #130,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     697: checkcast     #41                 // class java/lang/Number
     700: invokevirtual #45                 // Method java/lang/Number.intValue:()I
     703: istore        13
     705: aload         5
     707: iload         12
     709: invokestatic  #54                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     712: invokeinterface #60,  2           // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     717: dup
     718: invokestatic  #64                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     721: checkcast     #66                 // class java/util/Set
     724: iload         13
     726: invokestatic  #54                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     729: invokeinterface #159,  2          // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z
     734: pop
     735: aload         5
     737: iload         13
     739: invokestatic  #54                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     742: invokeinterface #60,  2           // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     747: dup
     748: invokestatic  #64                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     751: checkcast     #66                 // class java/util/Set
     754: iload         12
     756: invokestatic  #54                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     759: invokeinterface #159,  2          // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z
     764: pop
     765: nop
     766: nop
     767: goto          644
     770: nop
     771: aload_3
     772: checkcast     #20                 // class java/lang/Iterable
     775: astore        7
     777: nop
     778: iconst_0
     779: istore        8
     781: aload         7
     783: astore        9
     785: new           #108                // class java/util/ArrayList
     788: dup
     789: aload         7
     791: bipush        10
     793: invokestatic  #114                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     796: invokespecial #118                // Method java/util/ArrayList."<init>":(I)V
     799: checkcast     #120                // class java/util/Collection
     802: astore        10
     804: iconst_0
     805: istore        11
     807: iconst_0
     808: istore        12
     810: aload         9
     812: invokeinterface #24,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     817: astore        13
     819: aload         13
     821: invokeinterface #30,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     826: ifeq          901
     829: aload         13
     831: invokeinterface #34,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     836: astore        14
     838: aload         10
     840: iload         12
     842: iinc          12, 1
     845: istore        15
     847: iload         15
     849: ifge          855
     852: invokestatic  #162                // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
     855: iload         15
     857: aload         14
     859: checkcast     #41                 // class java/lang/Number
     862: invokevirtual #45                 // Method java/lang/Number.intValue:()I
     865: istore        16
     867: istore        17
     869: astore        24
     871: iconst_0
     872: istore        18
     874: iload         17
     876: iconst_1
     877: iadd
     878: invokestatic  #54                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     881: iload         16
     883: invokestatic  #54                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     886: invokestatic  #136                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     889: aload         24
     891: swap
     892: invokeinterface #127,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     897: pop
     898: goto          819
     901: aload         10
     903: checkcast     #86                 // class java/util/List
     906: nop
     907: checkcast     #20                 // class java/lang/Iterable
     910: astore        7
     912: nop
     913: iconst_0
     914: istore        8
     916: aload         7
     918: new           #164                // class io/hsar/practice3/ProblemEKt$main$$inlined$sortedBy$1
     921: dup
     922: invokespecial #165                // Method io/hsar/practice3/ProblemEKt$main$$inlined$sortedBy$1."<init>":()V
     925: checkcast     #167                // class java/util/Comparator
     928: invokestatic  #171                // Method kotlin/collections/CollectionsKt.sortedWith:(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
     931: astore        6
     933: aload_3
     934: checkcast     #20                 // class java/lang/Iterable
     937: astore        8
     939: nop
     940: iconst_0
     941: istore        9
     943: aload         8
     945: astore        10
     947: new           #108                // class java/util/ArrayList
     950: dup
     951: aload         8
     953: bipush        10
     955: invokestatic  #114                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     958: invokespecial #118                // Method java/util/ArrayList."<init>":(I)V
     961: checkcast     #120                // class java/util/Collection
     964: astore        11
     966: iconst_0
     967: istore        12
     969: iconst_0
     970: istore        13
     972: aload         10
     974: invokeinterface #24,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     979: astore        14
     981: aload         14
     983: invokeinterface #30,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     988: ifeq          1064
     991: aload         14
     993: invokeinterface #34,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     998: astore        15
    1000: aload         11
    1002: iload         13
    1004: iinc          13, 1
    1007: istore        16
    1009: iload         16
    1011: ifge          1017
    1014: invokestatic  #162                // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
    1017: iload         16
    1019: aload         15
    1021: checkcast     #41                 // class java/lang/Number
    1024: invokevirtual #45                 // Method java/lang/Number.intValue:()I
    1027: istore        17
    1029: istore        18
    1031: astore        24
    1033: iconst_0
    1034: istore        19
    1036: aload         6
    1038: aload         5
    1040: iload         17
    1042: iload         18
    1044: iconst_1
    1045: iadd
    1046: invokestatic  #173                // Method findNumberOfValidMentees:(Ljava/util/List;Ljava/util/Map;II)I
    1049: invokestatic  #54                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    1052: aload         24
    1054: swap
    1055: invokeinterface #127,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1060: pop
    1061: goto          981
    1064: aload         11
    1066: checkcast     #86                 // class java/util/List
    1069: nop
    1070: astore        7
    1072: aload         7
    1074: checkcast     #20                 // class java/lang/Iterable
    1077: ldc           #100                // String
    1079: checkcast     #96                 // class java/lang/CharSequence
    1082: aconst_null
    1083: aconst_null
    1084: iconst_0
    1085: aconst_null
    1086: aconst_null
    1087: bipush        62
    1089: aconst_null
    1090: invokestatic  #177                // Method kotlin/collections/CollectionsKt.joinToString$default:(Ljava/lang/Iterable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String;
    1093: getstatic     #183                // Field java/lang/System.out:Ljava/io/PrintStream;
    1096: swap
    1097: invokevirtual #188                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1100: return

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

Compiled from "Comparisons.kt"
public final class io.hsar.practice3.ProblemEKt$main$$inlined$sortedBy$1<T> implements java.util.Comparator {
  public io.hsar.practice3.ProblemEKt$main$$inlined$sortedBy$1();
    Code:
       0: aload_0
       1: invokespecial #16                 // Method java/lang/Object."<init>":()V
       4: return

  public final int compare(T, T);
    Code:
       0: aload_1
       1: checkcast     #23                 // class kotlin/Pair
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_3
       9: invokevirtual #27                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
      12: checkcast     #29                 // class java/lang/Number
      15: invokevirtual #33                 // Method java/lang/Number.intValue:()I
      18: istore        5
      20: iload         5
      22: invokestatic  #39                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      25: checkcast     #41                 // class java/lang/Comparable
      28: aload_2
      29: checkcast     #23                 // class kotlin/Pair
      32: astore_3
      33: astore        6
      35: iconst_0
      36: istore        4
      38: aload_3
      39: invokevirtual #27                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
      42: checkcast     #29                 // class java/lang/Number
      45: invokevirtual #33                 // Method java/lang/Number.intValue:()I
      48: istore        5
      50: iload         5
      52: invokestatic  #39                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      55: aload         6
      57: swap
      58: checkcast     #41                 // class java/lang/Comparable
      61: invokestatic  #47                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      64: ireturn
}


package ca.josue.rational

import java.math.BigInteger

class Rational (private val numerator: BigInteger, private val denominator: BigInteger) : Comparable<Rational>{

    init {
        if (denominator == BigInteger.ZERO)
            throw IllegalArgumentException("Denominator cannot be 0")
    }

    // Redefinition des opérateurs
    operator fun plus(other: Rational): Rational {
        val num = (numerator * other.denominator) + (denominator * other.numerator)
        val den = denominator * other.denominator
        return num.divBy(den)
    }

    operator fun minus(other: Rational) : Rational{
        val num = (numerator * other.denominator) - (denominator * other.numerator)
        val den = denominator * other.denominator
        return num.divBy(den)
    }

    operator fun times(other: Rational): Rational{
        return (numerator * other.numerator).divBy(denominator * other.denominator)
    }

    operator fun div(other: Rational):Rational{
        return (numerator * other.denominator).divBy(denominator * other.numerator)
    }

    operator fun unaryMinus(): Rational = Rational(numerator.negate(),denominator)

    override fun compareTo(other: Rational): Int {
        return (numerator * other.denominator).compareTo(denominator * other.numerator)
    }

    private fun simplify(rational: Rational): Rational{
        val greatCommonDivisor = rational.numerator.gcd(rational.denominator)
        val num = rational.numerator / greatCommonDivisor
        val den = rational.denominator / greatCommonDivisor
        return Rational(num, den)
    }

    private fun formatRational(): String = "$numerator/$denominator"

    override fun equals(other: Any?): Boolean {
        if (this === other) return true

        other as Rational
        val thisSimplified = simplify(this)
        val otherSimplified = simplify(other)
        val thisAsDouble = thisSimplified.numerator.toDouble() / thisSimplified.denominator.toDouble()
        val otherAsDouble = otherSimplified.numerator.toDouble() / otherSimplified.denominator.toDouble()
        return thisAsDouble == otherAsDouble
    }

    override fun toString(): String {
        val shouldBeOneNumber = denominator == BigInteger.ONE || numerator % denominator == BigInteger.ZERO
        return when {
            shouldBeOneNumber -> (numerator / denominator).toString()
            else -> {
                val thisSimplified = simplify(this)

                if (thisSimplified.denominator < BigInteger.ZERO || (thisSimplified.numerator < BigInteger.ZERO && thisSimplified.denominator < BigInteger.ZERO)){
                    Rational(thisSimplified.numerator.negate(), thisSimplified.denominator.negate()).formatRational()
                }
                else{
                    Rational(thisSimplified.numerator, thisSimplified.denominator).formatRational()
                }
            }
        }
    }

    override fun hashCode(): Int {
        var result = numerator.hashCode()
        result = 31 * result + denominator.hashCode()
        return result
    }
}

fun String.toRational():Rational{
    val ratio = split('/')
    return when (ratio.size) {
        1 -> Rational(ratio[0].toBigInteger(), BigInteger.ONE)
        2 -> Rational(ratio[0].toBigInteger(), ratio[1].toBigInteger())
        else -> throw IllegalArgumentException("Invalid format")
    }
}

// Infix
infix fun Int.divBy(other: Int):Rational = Rational(toBigInteger(), other.toBigInteger())
infix fun Long.divBy(other: Long): Rational = Rational(toBigInteger(), other.toBigInteger())
infix fun BigInteger.divBy(other: BigInteger) = Rational(this, other)

fun main() {
    val half = 1 divBy 2
    val third = 1 divBy 3

    val sum: Rational = half + third
    println(5 divBy 6 == sum)

    val difference: Rational = half - third
    println(1 divBy 6 == difference)

    val product: Rational = half * third
    println(1 divBy 6 == product)

    val quotient: Rational = half / third
    println(3 divBy 2 == quotient)

    val negation: Rational = -half
    println(-1 divBy 2 == negation)

    println((2 divBy 1).toString() == "2")
    println((-2 divBy 4).toString() == "-1/2")
    println("117/1098".toRational().toString() == "13/122")

    val twoThirds = 2 divBy 3
    println(half < twoThirds)

    println(half in third..twoThirds)

    println(2000000000L divBy 4000000000L == 1 divBy 2)

    println("912016490186296920119201192141970416029".toBigInteger() divBy
            "1824032980372593840238402384283940832058".toBigInteger() == 1 divBy 2)
}

Compiled from "Rational.kt"
public final class ca.josue.rational.RationalKt {
  public static final ca.josue.rational.Rational toRational(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #9                  // String <this>
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #17                 // class java/lang/CharSequence
      10: iconst_1
      11: newarray       char
      13: astore_2
      14: aload_2
      15: iconst_0
      16: bipush        47
      18: castore
      19: aload_2
      20: iconst_0
      21: iconst_0
      22: bipush        6
      24: aconst_null
      25: invokestatic  #23                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[CZIILjava/lang/Object;)Ljava/util/List;
      28: astore_1
      29: aload_1
      30: invokeinterface #29,  1           // InterfaceMethod java/util/List.size:()I
      35: tableswitch   { // 1 to 2
                     1: 56
                     2: 92
               default: 136
          }
      56: new           #31                 // class ca/josue/rational/Rational
      59: dup
      60: new           #33                 // class java/math/BigInteger
      63: dup
      64: aload_1
      65: iconst_0
      66: invokeinterface #37,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      71: checkcast     #39                 // class java/lang/String
      74: invokespecial #43                 // Method java/math/BigInteger."<init>":(Ljava/lang/String;)V
      77: getstatic     #47                 // Field java/math/BigInteger.ONE:Ljava/math/BigInteger;
      80: dup
      81: ldc           #48                 // String ONE
      83: invokestatic  #51                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      86: invokespecial #54                 // Method ca/josue/rational/Rational."<init>":(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
      89: goto          146
      92: new           #31                 // class ca/josue/rational/Rational
      95: dup
      96: new           #33                 // class java/math/BigInteger
      99: dup
     100: aload_1
     101: iconst_0
     102: invokeinterface #37,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     107: checkcast     #39                 // class java/lang/String
     110: invokespecial #43                 // Method java/math/BigInteger."<init>":(Ljava/lang/String;)V
     113: new           #33                 // class java/math/BigInteger
     116: dup
     117: aload_1
     118: iconst_1
     119: invokeinterface #37,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     124: checkcast     #39                 // class java/lang/String
     127: invokespecial #43                 // Method java/math/BigInteger."<init>":(Ljava/lang/String;)V
     130: invokespecial #54                 // Method ca/josue/rational/Rational."<init>":(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
     133: goto          146
     136: new           #56                 // class java/lang/IllegalArgumentException
     139: dup
     140: ldc           #58                 // String Invalid format
     142: invokespecial #59                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
     145: athrow
     146: areturn

  public static final ca.josue.rational.Rational divBy(int, int);
    Code:
       0: new           #31                 // class ca/josue/rational/Rational
       3: dup
       4: iload_0
       5: i2l
       6: invokestatic  #71                 // Method java/math/BigInteger.valueOf:(J)Ljava/math/BigInteger;
       9: dup
      10: ldc           #73                 // String valueOf(...)
      12: invokestatic  #51                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      15: iload_1
      16: i2l
      17: invokestatic  #71                 // Method java/math/BigInteger.valueOf:(J)Ljava/math/BigInteger;
      20: dup
      21: ldc           #73                 // String valueOf(...)
      23: invokestatic  #51                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      26: invokespecial #54                 // Method ca/josue/rational/Rational."<init>":(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
      29: areturn

  public static final ca.josue.rational.Rational divBy(long, long);
    Code:
       0: new           #31                 // class ca/josue/rational/Rational
       3: dup
       4: lload_0
       5: invokestatic  #71                 // Method java/math/BigInteger.valueOf:(J)Ljava/math/BigInteger;
       8: dup
       9: ldc           #73                 // String valueOf(...)
      11: invokestatic  #51                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      14: lload_2
      15: invokestatic  #71                 // Method java/math/BigInteger.valueOf:(J)Ljava/math/BigInteger;
      18: dup
      19: ldc           #73                 // String valueOf(...)
      21: invokestatic  #51                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      24: invokespecial #54                 // Method ca/josue/rational/Rational."<init>":(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
      27: areturn

  public static final ca.josue.rational.Rational divBy(java.math.BigInteger, java.math.BigInteger);
    Code:
       0: aload_0
       1: ldc           #9                  // String <this>
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #80                 // String other
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #31                 // class ca/josue/rational/Rational
      15: dup
      16: aload_0
      17: aload_1
      18: invokespecial #54                 // Method ca/josue/rational/Rational."<init>":(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
      21: areturn

  public static final void main();
    Code:
       0: iconst_1
       1: iconst_2
       2: invokestatic  #84                 // Method divBy:(II)Lca/josue/rational/Rational;
       5: astore_0
       6: iconst_1
       7: iconst_3
       8: invokestatic  #84                 // Method divBy:(II)Lca/josue/rational/Rational;
      11: astore_1
      12: aload_0
      13: aload_1
      14: invokevirtual #88                 // Method ca/josue/rational/Rational.plus:(Lca/josue/rational/Rational;)Lca/josue/rational/Rational;
      17: astore_2
      18: iconst_5
      19: bipush        6
      21: invokestatic  #84                 // Method divBy:(II)Lca/josue/rational/Rational;
      24: aload_2
      25: invokestatic  #92                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      28: istore_3
      29: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
      32: iload_3
      33: invokevirtual #104                // Method java/io/PrintStream.println:(Z)V
      36: aload_0
      37: aload_1
      38: invokevirtual #107                // Method ca/josue/rational/Rational.minus:(Lca/josue/rational/Rational;)Lca/josue/rational/Rational;
      41: astore_3
      42: iconst_1
      43: bipush        6
      45: invokestatic  #84                 // Method divBy:(II)Lca/josue/rational/Rational;
      48: aload_3
      49: invokestatic  #92                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      52: istore        4
      54: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
      57: iload         4
      59: invokevirtual #104                // Method java/io/PrintStream.println:(Z)V
      62: aload_0
      63: aload_1
      64: invokevirtual #110                // Method ca/josue/rational/Rational.times:(Lca/josue/rational/Rational;)Lca/josue/rational/Rational;
      67: astore        4
      69: iconst_1
      70: bipush        6
      72: invokestatic  #84                 // Method divBy:(II)Lca/josue/rational/Rational;
      75: aload         4
      77: invokestatic  #92                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      80: istore        5
      82: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
      85: iload         5
      87: invokevirtual #104                // Method java/io/PrintStream.println:(Z)V
      90: aload_0
      91: aload_1
      92: invokevirtual #113                // Method ca/josue/rational/Rational.div:(Lca/josue/rational/Rational;)Lca/josue/rational/Rational;
      95: astore        5
      97: iconst_3
      98: iconst_2
      99: invokestatic  #84                 // Method divBy:(II)Lca/josue/rational/Rational;
     102: aload         5
     104: invokestatic  #92                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     107: istore        6
     109: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
     112: iload         6
     114: invokevirtual #104                // Method java/io/PrintStream.println:(Z)V
     117: aload_0
     118: invokevirtual #117                // Method ca/josue/rational/Rational.unaryMinus:()Lca/josue/rational/Rational;
     121: astore        6
     123: iconst_m1
     124: iconst_2
     125: invokestatic  #84                 // Method divBy:(II)Lca/josue/rational/Rational;
     128: aload         6
     130: invokestatic  #92                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     133: istore        7
     135: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
     138: iload         7
     140: invokevirtual #104                // Method java/io/PrintStream.println:(Z)V
     143: iconst_2
     144: iconst_1
     145: invokestatic  #84                 // Method divBy:(II)Lca/josue/rational/Rational;
     148: invokevirtual #121                // Method ca/josue/rational/Rational.toString:()Ljava/lang/String;
     151: ldc           #123                // String 2
     153: invokestatic  #92                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     156: istore        7
     158: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
     161: iload         7
     163: invokevirtual #104                // Method java/io/PrintStream.println:(Z)V
     166: bipush        -2
     168: iconst_4
     169: invokestatic  #84                 // Method divBy:(II)Lca/josue/rational/Rational;
     172: invokevirtual #121                // Method ca/josue/rational/Rational.toString:()Ljava/lang/String;
     175: ldc           #125                // String -1/2
     177: invokestatic  #92                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     180: istore        7
     182: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
     185: iload         7
     187: invokevirtual #104                // Method java/io/PrintStream.println:(Z)V
     190: ldc           #127                // String 117/1098
     192: invokestatic  #129                // Method toRational:(Ljava/lang/String;)Lca/josue/rational/Rational;
     195: invokevirtual #121                // Method ca/josue/rational/Rational.toString:()Ljava/lang/String;
     198: ldc           #131                // String 13/122
     200: invokestatic  #92                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     203: istore        7
     205: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
     208: iload         7
     210: invokevirtual #104                // Method java/io/PrintStream.println:(Z)V
     213: iconst_2
     214: iconst_3
     215: invokestatic  #84                 // Method divBy:(II)Lca/josue/rational/Rational;
     218: astore        7
     220: aload_0
     221: aload         7
     223: invokevirtual #135                // Method ca/josue/rational/Rational.compareTo:(Lca/josue/rational/Rational;)I
     226: ifge          233
     229: iconst_1
     230: goto          234
     233: iconst_0
     234: istore        8
     236: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
     239: iload         8
     241: invokevirtual #104                // Method java/io/PrintStream.println:(Z)V
     244: iconst_0
     245: aload_0
     246: checkcast     #137                // class java/lang/Comparable
     249: aload_1
     250: invokeinterface #140,  2          // InterfaceMethod java/lang/Comparable.compareTo:(Ljava/lang/Object;)I
     255: if_icmpgt     280
     258: aload_0
     259: checkcast     #137                // class java/lang/Comparable
     262: aload         7
     264: invokeinterface #140,  2          // InterfaceMethod java/lang/Comparable.compareTo:(Ljava/lang/Object;)I
     269: ifgt          276
     272: iconst_1
     273: goto          281
     276: iconst_0
     277: goto          281
     280: iconst_0
     281: istore        8
     283: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
     286: iload         8
     288: invokevirtual #104                // Method java/io/PrintStream.println:(Z)V
     291: ldc2_w        #141                // long 2000000000l
     294: ldc2_w        #143                // long 4000000000l
     297: invokestatic  #146                // Method divBy:(JJ)Lca/josue/rational/Rational;
     300: iconst_1
     301: iconst_2
     302: invokestatic  #84                 // Method divBy:(II)Lca/josue/rational/Rational;
     305: invokestatic  #92                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     308: istore        8
     310: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
     313: iload         8
     315: invokevirtual #104                // Method java/io/PrintStream.println:(Z)V
     318: new           #33                 // class java/math/BigInteger
     321: dup
     322: ldc           #148                // String 912016490186296920119201192141970416029
     324: invokespecial #43                 // Method java/math/BigInteger."<init>":(Ljava/lang/String;)V
     327: new           #33                 // class java/math/BigInteger
     330: dup
     331: ldc           #150                // String 1824032980372593840238402384283940832058
     333: invokespecial #43                 // Method java/math/BigInteger."<init>":(Ljava/lang/String;)V
     336: invokestatic  #152                // Method divBy:(Ljava/math/BigInteger;Ljava/math/BigInteger;)Lca/josue/rational/Rational;
     339: iconst_1
     340: iconst_2
     341: invokestatic  #84                 // Method divBy:(II)Lca/josue/rational/Rational;
     344: invokestatic  #92                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     347: istore        8
     349: getstatic     #98                 // Field java/lang/System.out:Ljava/io/PrintStream;
     352: iload         8
     354: invokevirtual #104                // Method java/io/PrintStream.println:(Z)V
     357: return

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

Compiled from "Rational.kt"
public final class ca.josue.rational.Rational implements java.lang.Comparable<ca.josue.rational.Rational> {
  private final java.math.BigInteger numerator;

  private final java.math.BigInteger denominator;

  public ca.josue.rational.Rational(java.math.BigInteger, java.math.BigInteger);
    Code:
       0: aload_1
       1: ldc           #12                 // String numerator
       3: invokestatic  #18                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #20                 // String denominator
       9: invokestatic  #18                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: invokespecial #23                 // Method java/lang/Object."<init>":()V
      16: aload_0
      17: aload_1
      18: putfield      #26                 // Field numerator:Ljava/math/BigInteger;
      21: aload_0
      22: aload_2
      23: putfield      #28                 // Field denominator:Ljava/math/BigInteger;
      26: nop
      27: aload_0
      28: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      31: getstatic     #33                 // Field java/math/BigInteger.ZERO:Ljava/math/BigInteger;
      34: invokestatic  #37                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      37: ifeq          50
      40: new           #39                 // class java/lang/IllegalArgumentException
      43: dup
      44: ldc           #41                 // String Denominator cannot be 0
      46: invokespecial #44                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      49: athrow
      50: nop
      51: return

  public final ca.josue.rational.Rational plus(ca.josue.rational.Rational);
    Code:
       0: aload_1
       1: ldc           #50                 // String other
       3: invokestatic  #18                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: nop
       7: aload_0
       8: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      11: aload_1
      12: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      15: invokevirtual #54                 // Method java/math/BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      18: dup
      19: ldc           #56                 // String multiply(...)
      21: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      24: aload_0
      25: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      28: aload_1
      29: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      32: invokevirtual #54                 // Method java/math/BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      35: dup
      36: ldc           #56                 // String multiply(...)
      38: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      41: invokevirtual #62                 // Method java/math/BigInteger.add:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      44: dup
      45: ldc           #64                 // String add(...)
      47: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      50: astore_2
      51: aload_0
      52: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      55: aload_1
      56: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      59: invokevirtual #54                 // Method java/math/BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      62: dup
      63: ldc           #56                 // String multiply(...)
      65: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      68: astore_3
      69: aload_2
      70: aload_3
      71: invokestatic  #70                 // Method ca/josue/rational/RationalKt.divBy:(Ljava/math/BigInteger;Ljava/math/BigInteger;)Lca/josue/rational/Rational;
      74: areturn

  public final ca.josue.rational.Rational minus(ca.josue.rational.Rational);
    Code:
       0: aload_1
       1: ldc           #50                 // String other
       3: invokestatic  #18                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: nop
       7: aload_0
       8: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      11: aload_1
      12: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      15: invokevirtual #54                 // Method java/math/BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      18: dup
      19: ldc           #56                 // String multiply(...)
      21: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      24: aload_0
      25: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      28: aload_1
      29: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      32: invokevirtual #54                 // Method java/math/BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      35: dup
      36: ldc           #56                 // String multiply(...)
      38: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      41: invokevirtual #76                 // Method java/math/BigInteger.subtract:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      44: dup
      45: ldc           #78                 // String subtract(...)
      47: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      50: astore_2
      51: aload_0
      52: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      55: aload_1
      56: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      59: invokevirtual #54                 // Method java/math/BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      62: dup
      63: ldc           #56                 // String multiply(...)
      65: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      68: astore_3
      69: aload_2
      70: aload_3
      71: invokestatic  #70                 // Method ca/josue/rational/RationalKt.divBy:(Ljava/math/BigInteger;Ljava/math/BigInteger;)Lca/josue/rational/Rational;
      74: areturn

  public final ca.josue.rational.Rational times(ca.josue.rational.Rational);
    Code:
       0: aload_1
       1: ldc           #50                 // String other
       3: invokestatic  #18                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      10: aload_1
      11: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      14: invokevirtual #54                 // Method java/math/BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      17: dup
      18: ldc           #56                 // String multiply(...)
      20: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      23: aload_0
      24: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      27: aload_1
      28: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      31: invokevirtual #54                 // Method java/math/BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      34: dup
      35: ldc           #56                 // String multiply(...)
      37: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      40: invokestatic  #70                 // Method ca/josue/rational/RationalKt.divBy:(Ljava/math/BigInteger;Ljava/math/BigInteger;)Lca/josue/rational/Rational;
      43: areturn

  public final ca.josue.rational.Rational div(ca.josue.rational.Rational);
    Code:
       0: aload_1
       1: ldc           #50                 // String other
       3: invokestatic  #18                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      10: aload_1
      11: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      14: invokevirtual #54                 // Method java/math/BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      17: dup
      18: ldc           #56                 // String multiply(...)
      20: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      23: aload_0
      24: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      27: aload_1
      28: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      31: invokevirtual #54                 // Method java/math/BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      34: dup
      35: ldc           #56                 // String multiply(...)
      37: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      40: invokestatic  #70                 // Method ca/josue/rational/RationalKt.divBy:(Ljava/math/BigInteger;Ljava/math/BigInteger;)Lca/josue/rational/Rational;
      43: areturn

  public final ca.josue.rational.Rational unaryMinus();
    Code:
       0: new           #2                  // class ca/josue/rational/Rational
       3: dup
       4: aload_0
       5: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
       8: invokevirtual #86                 // Method java/math/BigInteger.negate:()Ljava/math/BigInteger;
      11: dup
      12: ldc           #88                 // String negate(...)
      14: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      17: aload_0
      18: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      21: invokespecial #90                 // Method "<init>":(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
      24: areturn

  public int compareTo(ca.josue.rational.Rational);
    Code:
       0: aload_1
       1: ldc           #50                 // String other
       3: invokestatic  #18                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      10: aload_1
      11: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      14: invokevirtual #54                 // Method java/math/BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      17: dup
      18: ldc           #56                 // String multiply(...)
      20: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      23: aload_0
      24: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      27: aload_1
      28: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      31: invokevirtual #54                 // Method java/math/BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      34: dup
      35: ldc           #56                 // String multiply(...)
      37: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      40: invokevirtual #95                 // Method java/math/BigInteger.compareTo:(Ljava/math/BigInteger;)I
      43: ireturn

  private final ca.josue.rational.Rational simplify(ca.josue.rational.Rational);
    Code:
       0: aload_1
       1: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
       4: aload_1
       5: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
       8: invokevirtual #99                 // Method java/math/BigInteger.gcd:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      11: astore_2
      12: aload_1
      13: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      16: aload_2
      17: invokestatic  #103                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      20: aload_2
      21: invokevirtual #106                // Method java/math/BigInteger.divide:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      24: dup
      25: ldc           #108                // String divide(...)
      27: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      30: astore_3
      31: aload_1
      32: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      35: aload_2
      36: invokevirtual #106                // Method java/math/BigInteger.divide:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      39: dup
      40: ldc           #108                // String divide(...)
      42: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      45: astore        4
      47: new           #2                  // class ca/josue/rational/Rational
      50: dup
      51: aload_3
      52: aload         4
      54: invokespecial #90                 // Method "<init>":(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
      57: areturn

  private final java.lang.String formatRational();
    Code:
       0: new           #114                // class java/lang/StringBuilder
       3: dup
       4: invokespecial #115                // Method java/lang/StringBuilder."<init>":()V
       7: aload_0
       8: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      11: invokevirtual #119                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      14: bipush        47
      16: invokevirtual #122                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      19: aload_0
      20: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      23: invokevirtual #119                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      26: invokevirtual #125                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      29: areturn

  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: ldc           #130                // String null cannot be cast to non-null type ca.josue.rational.Rational
      10: invokestatic  #132                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;Ljava/lang/String;)V
      13: aload_1
      14: checkcast     #2                  // class ca/josue/rational/Rational
      17: pop
      18: aload_0
      19: aload_0
      20: invokespecial #134                // Method simplify:(Lca/josue/rational/Rational;)Lca/josue/rational/Rational;
      23: astore_2
      24: aload_0
      25: aload_1
      26: checkcast     #2                  // class ca/josue/rational/Rational
      29: invokespecial #134                // Method simplify:(Lca/josue/rational/Rational;)Lca/josue/rational/Rational;
      32: astore_3
      33: aload_2
      34: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      37: invokevirtual #138                // Method java/math/BigInteger.doubleValue:()D
      40: aload_2
      41: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      44: invokevirtual #138                // Method java/math/BigInteger.doubleValue:()D
      47: ddiv
      48: dstore        4
      50: aload_3
      51: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      54: invokevirtual #138                // Method java/math/BigInteger.doubleValue:()D
      57: aload_3
      58: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      61: invokevirtual #138                // Method java/math/BigInteger.doubleValue:()D
      64: ddiv
      65: dstore        6
      67: dload         4
      69: dload         6
      71: dcmpg
      72: ifne          79
      75: iconst_1
      76: goto          80
      79: iconst_0
      80: ireturn

  public java.lang.String toString();
    Code:
       0: aload_0
       1: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
       4: getstatic     #147                // Field java/math/BigInteger.ONE:Ljava/math/BigInteger;
       7: invokestatic  #37                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      10: ifne          39
      13: aload_0
      14: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      17: aload_0
      18: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      21: invokevirtual #150                // Method java/math/BigInteger.remainder:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      24: dup
      25: ldc           #152                // String remainder(...)
      27: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      30: getstatic     #33                 // Field java/math/BigInteger.ZERO:Ljava/math/BigInteger;
      33: invokestatic  #37                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      36: ifeq          43
      39: iconst_1
      40: goto          44
      43: iconst_0
      44: istore_1
      45: nop
      46: iload_1
      47: ifeq          79
      50: aload_0
      51: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
      54: aload_0
      55: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      58: invokevirtual #106                // Method java/math/BigInteger.divide:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      61: dup
      62: ldc           #108                // String divide(...)
      64: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      67: invokevirtual #153                // Method java/math/BigInteger.toString:()Ljava/lang/String;
      70: dup
      71: ldc           #155                // String toString(...)
      73: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      76: goto          181
      79: aload_0
      80: aload_0
      81: invokespecial #134                // Method simplify:(Lca/josue/rational/Rational;)Lca/josue/rational/Rational;
      84: astore_2
      85: aload_2
      86: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      89: getstatic     #33                 // Field java/math/BigInteger.ZERO:Ljava/math/BigInteger;
      92: invokevirtual #95                 // Method java/math/BigInteger.compareTo:(Ljava/math/BigInteger;)I
      95: iflt          124
      98: aload_2
      99: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
     102: getstatic     #33                 // Field java/math/BigInteger.ZERO:Ljava/math/BigInteger;
     105: invokevirtual #95                 // Method java/math/BigInteger.compareTo:(Ljava/math/BigInteger;)I
     108: ifge          163
     111: aload_2
     112: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
     115: getstatic     #33                 // Field java/math/BigInteger.ZERO:Ljava/math/BigInteger;
     118: invokevirtual #95                 // Method java/math/BigInteger.compareTo:(Ljava/math/BigInteger;)I
     121: ifge          163
     124: new           #2                  // class ca/josue/rational/Rational
     127: dup
     128: aload_2
     129: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
     132: invokevirtual #86                 // Method java/math/BigInteger.negate:()Ljava/math/BigInteger;
     135: dup
     136: ldc           #88                 // String negate(...)
     138: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     141: aload_2
     142: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
     145: invokevirtual #86                 // Method java/math/BigInteger.negate:()Ljava/math/BigInteger;
     148: dup
     149: ldc           #88                 // String negate(...)
     151: invokestatic  #59                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     154: invokespecial #90                 // Method "<init>":(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
     157: invokespecial #157                // Method formatRational:()Ljava/lang/String;
     160: goto          181
     163: new           #2                  // class ca/josue/rational/Rational
     166: dup
     167: aload_2
     168: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
     171: aload_2
     172: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
     175: invokespecial #90                 // Method "<init>":(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
     178: invokespecial #157                // Method formatRational:()Ljava/lang/String;
     181: areturn

  public int hashCode();
    Code:
       0: aload_0
       1: getfield      #26                 // Field numerator:Ljava/math/BigInteger;
       4: invokevirtual #165                // Method java/math/BigInteger.hashCode:()I
       7: istore_1
       8: bipush        31
      10: iload_1
      11: imul
      12: aload_0
      13: getfield      #28                 // Field denominator:Ljava/math/BigInteger;
      16: invokevirtual #165                // Method java/math/BigInteger.hashCode:()I
      19: iadd
      20: istore_1
      21: iload_1
      22: ireturn

  public int compareTo(java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: checkcast     #2                  // class ca/josue/rational/Rational
       5: invokevirtual #170                // Method compareTo:(Lca/josue/rational/Rational;)I
       8: ireturn
}