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
| package a | |
| import ( | |
| "cmp" | |
| _ "runtime" | |
| "slices" | |
| _ "unsafe" | |
| ) | |
| func anagramMap(a, b string) bool { |
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
| helper := (a, b, n) => n :: { | |
| 0 -> a, | |
| _ -> helper(b, a+b, n-1) | |
| } | |
| (n) => helper(0, 1, n) |
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
| package main | |
| import "strings" | |
| func chan_fromstring(input string) <-chan byte { | |
| ch := make(chan byte) | |
| go func() { | |
| for _, c := range input { | |
| ch <- byte(c) | |
| } |
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
| package tt | |
| /* | |
| goos: linux | |
| goarch: amd64 | |
| cpu: Intel(R) Core(TM) i3-6100U CPU @ 2.30GHz | |
| BenchmarkInterface-4 402143721 2.880 ns/op | |
| BenchmarkTemplate-4 205737126 6.119 ns/op | |
| BenchmarkDirect-4 1000000000 0.5869 ns/op | |
| BenchmarkFunctionPointer-4 166973348 6.738 ns/op |
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
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| ) | |
| var _table = map[rune]int{ | |
| // Numbers | |
| '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
| def nop(*args): pass | |
| def f(n, e=lambda f:f()): | |
| print(f"f#{n} started") | |
| def cont(k=nop): | |
| print(f"f#{n} ended") | |
| k() | |
| e(cont) | |
| f(1, lambda cont: f(2, lambda cont2: cont(cont2))) |
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
| /* | |
| Автоматическое прохождение проверочных заданий. Просто нажимает все первые ответы и отправляет. | |
| Неправильные ответы можно исправить вручную. | |
| */ | |
| $(".response-label > input[value=choice_0]").click(); | |
| $("button.submit").click(); | |
| setTimeout(() => { | |
| for (let f of $(".notification.error.notification-submit")) | |
| f.parentNode.querySelector("input[value=choice_1]").click(); | |
| $("button.submit").click(); |
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
| METRO_DISTANCE | PRICE | |
|---|---|---|
| 677 | 7328400 | |
| 120 | 9754600 | |
| 1344 | 6781500 | |
| 1003 | 6784100 | |
| 591 | 7296200 | |
| 719 | 8121900 | |
| 406 | 8889400 | |
| 216 | 9819000 | |
| 2497 | 3924500 |