2021-12-01から1ヶ月間の記事一覧

ABC233 G - Strongest Takahashi

atcoder.jp 空行はスキップして良いという発想も大事だが、そもそも全ての長方形領域を列挙した O(N4) もそこまで大きくないというのに気付かなかった。 |rust| const INF: i64 = 1 << 60; fn main() { let (r, w) = (std::io::stdin(), std::io::stdout());…

Put "open" to your class and its method when you get a NullPointerException by mocking your class by Mockito.

Problem When you have MyClass and try to write a test by mocking MyClass as the following, you will get an NPE: MyClass: open class MyClass { fun createList(string: String): List<String> { return listOf("A", "B", "C", string) } } Mocking MyClass b</string>…