Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (30 sloc) 1.08 KB
package craftingojuz.model
data class Contest (val id: Int,
val name: String,
val startTimeSeconds: Int) {
val center: Int
val ratedBound: Int
init {
val nameWithoutSpaces = name.replace(" ", "")
if("Div.3" in nameWithoutSpaces) {
// Div.3 match
this.center = 1600 / 2 + 200
this.ratedBound = 1600
}else {
val isDiv1 = "Div.1" in nameWithoutSpaces
val isDiv2 = "Div.2" in nameWithoutSpaces
if(isDiv1 && !isDiv2) {
// Div.1 match
this.center = 1900 / 2 + 200 // although this doesn't happen
this.ratedBound = Integer.MAX_VALUE // for ARC, it is 2800, but we use AGC's criteria
}else if(!isDiv1 && isDiv2) {
// Div.2 match
this.center = 1900 / 2 + 200
this.ratedBound = 1900
}else {
this.center = 1900 / 2 + 200 // same with Codeforces
this.ratedBound = Integer.MAX_VALUE
}
}
}
}