Skip to content

Instantly share code, notes, and snippets.

@wasabili
wasabili / NetOthelloServ.java
Created October 31, 2010 05:56
NetOthello Server
import java.net.ServerSocket;
import java.net.Socket;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.*;
public class NetOthelloServ {
@wasabili
wasabili / NetOthello.java
Created October 31, 2010 05:54
NetOthello
import java.net.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
public class NetOthello{
Othello oth = null;
@wasabili
wasabili / othello.java
Created October 31, 2010 04:39
Othello
import java.net.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
public class Othello{
public static final int WHITE=-1;
public static final int BLACK=1;
@wasabili
wasabili / DNA.cpp
Created October 30, 2010 03:27
DNA
#include<queue>
#include<cstdio>
#include<cstring>
#include<cstdlib>
using namespace std;
struct node{
node *nodes[4];
int exists;
@wasabili
wasabili / aplusb.cpp
Created October 29, 2010 08:28
A+B Problem
#include<cstdio>
#include<stack>
#include<queue>
#include<vector>
using namespace std;
typedef struct {
int v;
long long int n;
@wasabili
wasabili / poster.cpp
Created October 28, 2010 08:36
Poster
#include <cstdio>
#include <string>
using namespace std;
string make(char x, int n){
string s;
for(int i=0;i<n;i++) s+=x;
return s;
}
@wasabili
wasabili / stairs.cpp
Created October 28, 2010 08:35
Stairs
#include <cstdio>
#include <cstring>
int diffs[500001];
int a[500002];
main(){
int n,power;
scanf("%d%d",&n,&power);
@wasabili
wasabili / aznyan.c
Created October 22, 2010 15:40
Aznyan AA
int
stk
[ 2 << 14
]; int ps = 0; int kofi(){char
a [ 2 << 15 ]; int c[ 2<<
15 ];int n;
int s;char d[ 2<<
14 ];int p ; int
@wasabili
wasabili / gist:640572
Created October 22, 2010 13:57
Aznyan (formatted)
int stk[2<<14];
int ps=0;
int kofi(){
char a[2<<15];
int c[2<<15];
int n;
int s;
unsigned char d[2<<14];
int p;
うんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんたんたんうんうんうんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんうんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんうんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんうんたんうんうんたんうんうんたんうんたんたんたんたんたんうんうんうんたんうんうんうんうんうんうんたんうんうんたんうんたんうんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんたんうんうんうんたんうんうんたんうんうんたんうんたんうんうんうんうんうんうんたんたんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうんうんうんたんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうんうんうんうんうんたんうんたんうんうん