Skip to content

Instantly share code, notes, and snippets.

Avatar

Hideyuki Tanaka tanakh

View GitHub Profile
View expr.txt
f_xor 0x13 3 154
f_mul 0x24 0x1b 15770
f_xor 0x2e 0x39 2
f_mul 0x16 0x10 1440
f_xor 0x33 7 55
f_add 0xb 5 177
f_add 6 0xd 271
f_mul 0xc 0x3e 0x445c
f_mul 0x23 0x13 12870
f_add 0x19 8 249
View output
20190823
20300317
20360317
20400307
20400823
20480107
20600317
20660617
20700103
20700223
View measure_time.cpp
#include <chrono>
int main()
{
auto start = std::chrono::system_clock::now();
// foo();
auto end = std::chrono::system_clock::now();
// elapsed time in seconds
std::chrono::duration<double> secs = end - start;
@tanakh
tanakh / main.cpp
Created Dec 12, 2015
code-runner-2015-final-open
View main.cpp
#include <iostream>
#include <string>
#include <sstream>
#include <iterator>
#include <fstream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <cstdlib>
@tanakh
tanakh / gochiusa-dl.sh
Created Oct 15, 2015
ごちうさアイコンダウンローダー
View gochiusa-dl.sh
mkdir gochiusa_icon
wget -r -l1 http://www.gochiusa.com/news/hp0001/index03220000.html
find www.gochiusa.com -type f | grep '/[0-9]\+\.png.\+$' | sed -e 's/\(.*\/\([0-9]\+\.png\).*\)/cp \1 gochiusa_icon\/\2/g' | sh
@tanakh
tanakh / main.cpp
Created Oct 5, 2015
CodeRunner 2015 QualA
View main.cpp
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <set>
#include <map>
#include <complex>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
@tanakh
tanakh / data.txt
Created Oct 4, 2015
CodeRunner 2015 qual A data
View data.txt
0 0 0
0 1 74
0 2 58
0 3 237
0 4 108
0 5 162
0 6 172
0 7 90
0 8 181
0 9 181
@tanakh
tanakh / 400.cpp
Last active Oct 2, 2015
TMCTF Programming 500
View 400.cpp
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <unordered_map>
using namespace std;
int size = 3;
View 1.c
#include <stdio.h>
#include <string.h>
main() {
int c, i, j, k, a, d;
char b[987];
scanf("%d", &c);
while (c--) {
scanf("%s", b);
a = 0;
for (i = 0; i < strlen(b); i++)
@tanakh
tanakh / Main.hs
Created Nov 2, 2014
CODE RUNNER 予選B
View Main.hs
{-# LANGUAGE ViewPatterns #-}
import Control.Monad
import System.Process
import Control.Concurrent
import Network.HTTP.Conduit
import qualified Data.ByteString.Lazy.Char8 as L
import Data.List
import System.IO
import Control.Applicative