This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data class Point( | |
| val x : Int, | |
| val y : Int | |
| ) | |
| // maze NxM where 0 is empty cell and 1 is wall | |
| val data = arrayOf( | |
| intArrayOf(0,0,0,0,0), | |
| intArrayOf(0,1,1,0,1), | |
| intArrayOf(0,1,0,0,1), | |
| intArrayOf(0,0,0,0,1), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import kotlin.math.pow | |
| import kotlin.math.sqrt | |
| import kotlin.random.Random | |
| import kotlin.time.measureTime | |
| data class City( | |
| val name : String, | |
| val x : Double, | |
| val y : Double | |
| ){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.File | |
| import java.util.* | |
| import kotlin.random.Random | |
| import kotlin.random.nextInt | |
| import kotlin.time.measureTime | |
| data class Edge( | |
| val a : Int, | |
| val b : Int, | |
| val w : Int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import kotlin.random.Random | |
| import kotlin.random.nextInt | |
| import kotlin.time.measureTime | |
| data class Edge( | |
| val a : Int, | |
| val b : Int, | |
| val w : Int | |
| ){ | |
| fun print(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * You can use https://play.kotlinlang.org/ to test this code | |
| */ | |
| import kotlin.random.Random | |
| import kotlin.random.nextInt | |
| import kotlin.time.measureTime | |
| data class Edge( | |
| val a : Int, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Person{ | |
| constructor(s,n,y,c,r,f,l){ | |
| this.surname = s; | |
| this.name = n; | |
| this.year = y; | |
| this.city = c; | |
| this.specialnist = r; | |
| this.form = f; | |
| this.languages = l; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocompatible | |
| syntax on | |
| set mouse =a | |
| set autoindent | |
| set expandtab | |
| set softtabstop =2 | |
| set shiftwidth =2 | |
| set shiftround | |
| set backspace =indent,eol,start |