Skip to content

Instantly share code, notes, and snippets.

View qnighy's full-sized avatar

Masaki Hara qnighy

View GitHub Profile
(1*(2/(3/((4-(5-(6*(7*8))))*9))))
(1*(2/(3/((4-(5-((6*7)*8)))*9))))
(1+(2+(3*((4*((5+6)*(7+8)))+9))))
(1*(2*(3*((4*((5*6)+(7*8)))-9))))
(1*(2/(3/(((4+5)*(6*(7*8)))-9))))
(1*(2/(3/(((4+5)*((6*7)*8))-9))))
(1*(2/(3/(((4-5)+(6*(7*8)))*9))))
(1*(2/(3/(((4-5)+((6*7)*8))*9))))
(1+(2+(3*(((4*(5+6))*(7+8))+9))))
(1*(2/(3/((((4+5)*6)*(7*8))-9))))
Device 0: "GeForce 9600 GT"
CUDA Driver Version: 3.0
CUDA Runtime Version: 3.0
CUDA Capability Major revision number: 1
CUDA Capability Minor revision number: 1
Total amount of global memory: 536870912 bytes
Number of multiprocessors: 8
Number of cores: 64
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 16384 bytes
@qnighy
qnighy / komachi.c
Created January 13, 2010 11:31
Creates komachi-zan that makes the number you want
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
const int digits[] = {1,2,3,4,5,6,7,8,9};
#define SIZE 9
#define DP_MAX 5
#define CSIZE 10
struct expr {
@qnighy
qnighy / TspBab.java
Created January 30, 2010 03:16
TSP Branch-and-Bound Solver Visualizer
import java.awt.*;
import java.awt.geom.*;
import java.awt.event.*;
import java.awt.image.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;
import java.lang.reflect.*;
@qnighy
qnighy / Makefile
Created January 31, 2010 13:36
Makefile for checkinstall FSharp
#!/usr/bin/make -f
# Makefile for checkinstall FSharp
# fsharp.zip
# -> http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/release.aspx
.PHONY: all clean
all: doc-pak description-pak
sn -q -R bin/FSharp.Core.dll /usr/share/cli-common/keys/mono.snk
@qnighy
qnighy / test.c
Created February 8, 2010 14:02
C Preprocessor Metaprogramming
#define IDENT(x) x
#define NOT0 1
#define NOT1 0
#define NOT_(x) NOT##x
#define NOT(x) NOT_(x)
#define AND00 0
#define AND01 0
#define AND10 0
#define AND11 1
#define AND_(x,y) AND##x##y
@qnighy
qnighy / j090577gw_t1.cpp
Created February 15, 2010 12:24
JOI 2010 honsen's solution and my answer of this competition
/*
TASKNO: 1
LANG: C++
NAME: Masaki Hara j090577gw
*/
/* timestamp: 10:29 */
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
typedef long long Int;
Int gcd(Int a, Int b) {
#include <cstdio>
#include <sys/time.h>
#include <unistd.h>
#include <stdarg.h>
using namespace std;
struct __bench__ {
double start;
char msg[100];
__bench__(const char* format, ...)
import java.io.*;
public class Score {
public static void main(String[] 引数) throws IOException {
BufferedReader 入力 = new BufferedReader(new FileReader("score.in"));
int 人数 = Integer.parseInt(入力.readLine());
int[] 得点 = new int[人数];
int[] 分布 = new int[101];
for(int 愛 = 0; 愛 < 人数; 愛++) {
得点[愛] = Integer.parseInt(入力.readLine());