Skip to content

Instantly share code, notes, and snippets.

View uwi's full-sized avatar

Uwi Tenpen uwi

  • Pirika, Inc.
  • Hachioji, Tokyo
  • 22:47 (UTC +09:00)
View GitHub Profile
@uwi
uwi / damage.md
Last active August 9, 2022 14:15
コトダマン ダメージ計算

2019/5月頭に、ダメージに上限(999999)がついた?100万ダメージ以上は出せなくなったのか検証してないけど

2019/4/16に、回復にバフが乗るようになった。

6/25にこっそり、キャラATK上昇効果にデッキ枚数が乗るようになり、バフが表示上弱体化した。つまり前者を乗せているカードは強化。後者は正常なダメージはもともと入っていたっぽい。

基本

@uwi
uwi / Action.java
Last active June 30, 2016 18:25
chain_easyのAI. まだ改良の余地大有り。深さ上限と時間上限を適当に設定してSimulator.mainを実行。ローカルの色調少しいじっているので他のマシンだと色調変えないといけないかも。
public class Action {
public int r, c;
public long plus;
public int ercol;
public Action(int r, int c) {
this.r = r;
this.c = c;
this.plus = 0;
this.ercol = 0;
@uwi
uwi / ichyo.py
Created September 30, 2015 10:39
ichyo
import requests as req
def getinput():
r = req.get("http://ichyo.jp/quiz.txt")
a = [int(_) for _ in r.text.split()]
return a
def supply(func, path):
import os.path, json
if not os.path.exists(path):
@uwi
uwi / data.txt
Last active August 29, 2015 14:28
dual palindrome 適当生データ ( https://www.codechef.com/COOK61/problems/DUALPAL )
[4, 16, [1, 2, 3, 5, 10, 15, 17, 34, 51, 85, 170, 255, 257, 273, 289, 305, 514, 530, 546, 562, 771, 787, 803, 819, 1285, 1365, 1445, 1525, 2570, 2650, 2730, 2810, 3855, 3935, 4015, 4095, 4097, 4369, 4641, 4913, 8194, 8466, 8738, 9010, 12291, 12563, 12835, 13107, 20485, 21845, 23205, 24565, 40970, 42330, 43690, 45050, 61455, 62815, 64175, 65535, 65537, 65793, 66049, 66305, 69649, 69905, 70161, 70417, 73761, 74017, 74273, 74529, 77873, 78129, 78385, 78641, 131074, 131330, 131586, 131842, 135186, 135442, 135698, 135954, 139298, 139554, 139810, 140066, 143410, 143666, 143922, 144178, 196611, 196867, 197123, 197379, 200723, 200979, 201235, 201491, 204835, 205091, 205347, 205603, 208947, 209203, 209459, 209715, 327685, 328965, 330245, 331525, 348245, 349525, 350805, 352085, 368805, 370085, 371365, 372645, 389365, 390645, 391925, 393205, 655370, 656650, 657930, 659210, 675930, 677210, 678490, 679770, 696490, 697770, 699050, 700330, 717050, 718330, 719610, 720890, 983055, 984335, 985615, 986895, 1003615, 1004895, 100
@uwi
uwi / Reactor2.java
Last active August 29, 2015 13:57
2048のAIのSelenium2と連携させているところ
package twothu;
import java.util.Arrays;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
@uwi
uwi / gist:4072319
Created November 14, 2012 14:14
Suffix Automaton
package utils.structure;
import java.util.Arrays;
import java.util.BitSet;
/**
* Suffix Automaton
* @author uwi
* see内のすべてを実装
* @see http://e-maxx.ru/algo/suffix_automata
@uwi
uwi / gist:3786385
Created September 26, 2012 06:14
ProjectEuler Problem 66
import java.math.BigInteger;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
// @see http://www37.atwiki.jp/uwicoder/pages/1639.html
// x^2-Dy^2=1の特殊解を求める。
// (s^2-D)t^2+(2s)t+1=0, s=0
// (-D)t^2+1=0
// t=1/√Dの連分数展開からconvergentsをつくって-D(num)^2+(den)^2=1になる最初の(num,den)をとってくればよい。
@uwi
uwi / gist:3782937
Created September 25, 2012 16:24
ProjectEuler Problm 65
#!/bin/bash
a=(0)
b=(0)
for((i=1;i<=6;i++)) do
a=(${a[@]} ${a[@]})
b=(${b[@]} ${b[@]})
done
a[0]=2
b[0]=1
@uwi
uwi / gist:3765379
Created September 22, 2012 06:40
ProjectEuler Problem 62
#!/bin/bash
declare -A ct
declare -A mins
lct=(0 0 0 0 0 0 0 0 0 0)
for((i=1;i<=100000;i++)); do
for((j=0;j<10;j++)); do
lct[$j]=0
done
for((v=i*i*i;v>0;v/=10)); do
@uwi
uwi / gist:3736881
Created September 17, 2012 11:49
ProjectEuler Problem 57
#!/bin/bash
# 浮動小数使えないのか・・
num=300000
den=200000
ct=0
for((i=0;i<1000;i++)) do
if [ $num -gt 1000000 ]; then
((ct++))
fi