Skip to content

Instantly share code, notes, and snippets.

View unsuthee's full-sized avatar

Un unsuthee

View GitHub Profile
@unsuthee
unsuthee / arbitrage
Created November 20, 2012 08:03
UVA 104 : Arbitrage
#include <iostream>
#include <stack>
using namespace std;
static const int MAX_SIZE = 20;
struct Cell {
double profit; // the best profit so far
@unsuthee
unsuthee / skiplist.h
Created November 20, 2012 08:00
C++ Implementation of Skiplist
///////////////////////////////////////////////////////////////////////////////
#ifndef _SKIPLIST_H_
#define _SKIPLIST_H_
#include <iostream>
#include <sstream>
///////////////////////////////////////////////////////////////////////////////
@unsuthee
unsuthee / mc.cpp
Created November 20, 2012 07:46
UVA 142 : Mouse Clicks
#include <iostream>
#include <vector>
#include <climits>
#include <cstdio>
#include <iomanip>
using namespace std;
class Rect
{
@unsuthee
unsuthee / sudoku.cpp
Created November 16, 2012 11:08
Sudoku Solver using Knuth's algorithmx
//////////////////////////////////////////////////////////////////////////////
// Sudoku Solving using Knuth's algorithmX
// Author: Suthee, 2008
///////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <vector>
using namespace std;
@unsuthee
unsuthee / UVA507.cpp
Created November 16, 2012 09:37
UVA 507 : Jill Rides Again
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int numRoutes;
cin >> numRoutes;