Skip to content

Instantly share code, notes, and snippets.

View tco10
#pragma GCC optimize ("O3")
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <map>
#include <sstream>
#include <vector>
#include <set>
#include <string>
View huga
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(int argc, char** argv) {
if (argc != 4) {
cerr << "arguments" << endl;
return 0;
int n = atoi(argv[1]);
View solution.cpp
// C++11
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
#include <string.h>
#include <random>
using namespace std;
View collatz.c
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <stdint.h>
#include <intrin.h>
uint64_t rdtsc(){
return __rdtsc();
int name[4], a1[4], a2[4];
gasin / mabling.pde
Last active Dec 3, 2017
code of processing to draw mabling images
View mabling.pde
import java.util.Random;
final int SIZE = 500;
int TIMER = 0;
int[][][] board = new int[SIZE][SIZE][3];
int[][][] buffer = new int[SIZE][SIZE][3];
boolean inside_board(int x, int y)
View sa-is.cpp
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
//1-indexed, var..maxnum
vector<int> SA_IS(vector<int> str, int var) {
if(str.size() == 1) {
vector<int> ret(1,0);
return ret;
View textbook_ver
from __future__ import print_function
from PIL import Image
import copy
train = []
test = []
for loop in range(1,3):
im =".png")
View othello_train
import time
time_start = time.time()
import numpy as np
import chainer
from chainer import cuda, Function, gradient_check, Variable, optimizers, serializers, utils
from chainer import Link, Chain, ChainList
import chainer.functions as F
import chainer.links as L
View POJ3678
#include <cstdio>
#include <vector>
#include <cstring>
using namespace std;
#define MAX_N 1000
int n, m; //頂点数、辺数
int cmp[MAX_N*2]; //属する強連結成分のトポロジカル順序
vector<int> vs; //帰りがけ順の並び
View codevsforstudent2016
#include <bits/stdc++.h>
using namespace std;
/** ブロックが置かれていない場所の値 */
static const int EMPTY_BLOCK = 0;
int EXPLODE = 300;
int OVER_KILL = 500;
int EX_PARA1 = 300;
int EX_PARA2 = 50;
You can’t perform that action at this time.