Skip to content

Instantly share code, notes, and snippets.

#include <cstdio>
#include <vector>
#include <set>
#include <utility>
#include <algorithm>
using namespace std;
int n;
pair<int, long long int> microbe[300000]; // 微生物の値(b, a)のpair
@potetisensei
potetisensei / 1328.cpp
Last active August 29, 2015 14:14
POJ 1328
#include <cstdio>
#include <cmath>
#include <utility>
#include <algorithm>
using namespace std;
#define EPS (1e-6)
typedef pair<long double, long double> Coor;
typedef pair<long double, Coor> Pair;
@potetisensei
potetisensei / 3689.cpp
Last active February 12, 2017 07:17
POJ 3689
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cassert>
#include <algorithm>
using namespace std;
#define EPS 1e-8
#define INF 1e10
from socket import *
from time import time, sleep
from struct import pack
from sys import argv
if len(argv) >= 2:
HOST = "107.189.94.25"
else :
HOST = "192.168.174.165"
OFFSET = 1

Keybase proof

I hereby claim:

  • I am potetisensei on github.
  • I am potetisensei (https://keybase.io/potetisensei) on keybase.
  • I have a public key whose fingerprint is F904 B5AC 2463 23DF 0967 9D3A 74CB 3C57 3D7D D7E1

To claim this, I am signing this object:

@potetisensei
potetisensei / M.py
Last active August 29, 2015 14:23
Internet Problem Solving Contest 2015 M
# encoding: utf-8
from commands import getoutput
from math import sqrt
# numbers: DPテーブルっぽいもの。numbers[i]は数値iを作れるJSの最小コードをもつ。
# 生成される数を短くする都合上、numbers[0]とnumbers[1]は単体では数値にならないようになっている(後で変更)
numbers = ["[]", "!+[]"] + [""]*999;
# 0から9までを予め生成
@potetisensei
potetisensei / J2.cpp
Last active August 29, 2015 14:23
Internet Problem Solving Contest 2015 J2
#include <cstdio>
bool check(unsigned short ax, unsigned short bx) {
unsigned short tmp;
for (int i=0; i<23; i++) {
if (bx < ax) return false;
if (ax == 0) return false;
bx -= ax;
tmp = ax;
@potetisensei
potetisensei / gist:09b7265bc95dfb000a7c
Last active August 29, 2015 14:24
for this: http://shindanmaker.com/549065 TODO: append CODEGATE 2014 Finals, SECUINSIDE 2014 Finals, DEFCON 2014 Finals, and so on
PlaidDB - Plaid 2015
Prodmanager - Plaid 2015
qttpd - Plaid 2015
tp - Plaid 2015
traveller - Plaid 2015
Weff - CODEGATE 2015
icbm - CODEGATE 2015
beef_steak - CODEGATE 2015
Bookstore - CODEGATE 2015
Olive and Mushroom Pizza - CODEGATE 2015
@potetisensei
potetisensei / weff.py
Last active August 29, 2015 14:25
Weff - CODEGATE 2015
import string
from socket import *
from struct import pack, unpack
from commands import getoutput
from time import sleep, time
from sys import argv, exit
def read_noblock(p, n):
p.setblocking(False)
try:
@potetisensei
potetisensei / 1759.cpp
Last active August 29, 2015 14:25
POJ 1759
#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
#define EPS 10e-3
int N;
double A;
double high;