This file contains 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 gdd2011; | |
import java.io.File; | |
import java.io.PrintWriter; | |
import java.util.Arrays; | |
import java.util.BitSet; | |
import java.util.Scanner; | |
/** | |
* 現在の解答状況と残りカウント数、残り問題等の表示 | |
* @author uwi |
This file contains 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
AA | |
AA | |
AA *4 | |
AB | |
AA *4 | |
BB | |
AB |
This file contains 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
#!/bin/bash | |
ret=0 | |
for((i=1;i<=100;i++)) do | |
c=1 | |
h=$((i>>1)) | |
for((j=1;j<=h;j++)) do | |
c=$((c*(i-j+1)/j)) | |
# echo "$i $j $c" | |
if [ $c -gt 1000000 ]; then |
This file contains 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
#!/bin/bash | |
# 関数呼び出しするだけでゲロ遅くなるのかー | |
ct=0 | |
for((i=1;i<10000;i++)) do | |
# echo "($i)" | |
x=$i | |
rev=0 | |
y=$x |
This file contains 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
#!/bin/bash | |
# 浮動小数使えないのか・・ | |
num=300000 | |
den=200000 | |
ct=0 | |
for((i=0;i<1000;i++)) do | |
if [ $num -gt 1000000 ]; then | |
((ct++)) | |
fi |
This file contains 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
#!/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 |
This file contains 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
#!/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 |
This file contains 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.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)をとってくればよい。 |
This file contains 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 utils.structure; | |
import java.util.Arrays; | |
import java.util.BitSet; | |
/** | |
* Suffix Automaton | |
* @author uwi | |
* see内のすべてを実装 | |
* @see http://e-maxx.ru/algo/suffix_automata |
This file contains 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 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; |
OlderNewer