Skip to content

Instantly share code, notes, and snippets.

View neetsdkasu's full-sized avatar
🔰
take it easy

Leonardone @ NEETSDKASU neetsdkasu

🔰
take it easy
View GitHub Profile
@neetsdkasu
neetsdkasu / main.go
Last active May 30, 2019 22:33
CodinGame A Code of Ice & Fire (io part of my bot)
package main
import (
"fmt"
"os"
)
func main() {
game := NewGame()
for {
@neetsdkasu
neetsdkasu / manifest.json
Last active March 19, 2019 16:05
show max rating on Topcoder MarathonMatch standings
{
"manifest_version": 2,
"name": "show max rating on Topcoder MarathonMatch standings",
"version": "1.0",
"author": "Leonardone",
"description": "show max rating on Topcoder MarathonMatch standings",
"content_scripts": [
{
"matches": ["*://community.topcoder.com/longcontest/*"],
@neetsdkasu
neetsdkasu / manifest.json
Last active March 7, 2019 21:07
add user data link on Topcoder MarathonMatch standings
{
"manifest_version": 2,
"name": "add user data link on Topcoder MarathonMatch standings",
"version": "1.0",
"author": "Leonardone",
"description": "add user data link on Topcoder MarathonMatch standings",
"content_scripts": [
{
"matches": ["*://community.topcoder.com/longcontest/*"],
@neetsdkasu
neetsdkasu / primes.hs
Created November 17, 2018 16:58
Primes ( Haskell ) (酷いw)
-- author: Leonardne @ NEETSDKASU
import qualified Data.IntSet as IS
hoge p = [p,p+p..]
fuga p = unzip . map (break (> p))
piyo (s, e, xs) =
case IS.minView s of
@neetsdkasu
neetsdkasu / XorShift.java
Last active November 17, 2018 16:57
XorShiftJava (雑)
import java.util.Random;
public class XorShift extends Random
{
static final long DEFAULT_SEED = 0xFEDC_BA98_7654_3210L;
private long seed;
public XorShift()
{
@neetsdkasu
neetsdkasu / ShuffleIndexes.java
Last active November 16, 2018 08:26
とても限定的な用途しかないシャッフルインデックス保持器
import java.util.Random;
public class ShuffleIndexes
{
int[][] indexes;
public ShuffleIndexes(int maxSize)
{
indexes = new int[maxSize + 1][];
for (int i = 0; i <= maxSize; i++)
@neetsdkasu
neetsdkasu / Combination.java
Last active November 16, 2018 08:25
コンビネーションなインデックス生成器 (for (i=0~){for (j=i+1 ~) { for (k=j+1~) )みたいな多重ループ避けられる(適当)
public class Combination
{
final int[] indexes;
final int end;
boolean finished = false;
public Combination(int end, int size)
{
this.end = end;
this.indexes = new int[size];
@neetsdkasu
neetsdkasu / CheckPolygon.vb
Last active October 11, 2018 09:45
TopCoder SRM739 div2 1000 (CheckPolygon) Solution
Option Explicit On
Option Strict On
Option Compare Binary
Option Infer On
Imports System.Collections.Generic
Imports System.Numerics
Imports Tp = System.Tuple(Of Integer, Integer)
Public Class CheckPolygon
@neetsdkasu
neetsdkasu / main.go
Created September 3, 2018 21:45
(自分用)LICENSEファイルを用意する手間を少しだけ省く
package main
import (
"flag"
"fmt"
"os"
"strconv"
"time"
)
@neetsdkasu
neetsdkasu / README.txt
Last active September 1, 2018 10:09
AtCoder ProblemsのRankingsのLanguage Ownersの名前出現数順の表を挿入するブラウザ拡張(雑)
ブラウザ拡張機能(アドオン)
AtCoder ProblemsのRankingsのLanguage Owners( kenkoooo.com/atcoder/?kind=lang )の名前出現数順の表を挿入するブラウザ拡張
ブラウザにmanifest.jsonを読み込ませる
FireFox: about:debugging#addons -> 一時的なアドオンを読み込む
vivalid: vivaldi://extensions -> パッケージ化されていない拡張機能を読み込む
manifest.jsonとscript.jsがあれば動く