This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** | |
Algorithms: Design and Analysis, Part 1 | |
Week 1 | |
Jan 2015 | |
***/ | |
#include <bits/stdc++.h> | |
using namespace std; | |
// [s,e) consider boundary!! make range uniform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (For CS321 Assignment 3. Winter'15) | |
// | |
// miniJava AST parser (starter version). | |
// | |
// Kai Jiang (at jiangkai (dot gmail com)) | |
// Feb 2015 | |
PARSER_BEGIN(AstParser) | |
import java.util.*; | |
import java.io.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int s; | |
bool inmap(int i,int j,int s){ | |
if( i < 0 || j < 0 || i >= s || j >= s){ | |
return false; | |
} | |
else{ | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
n = input() | |
def ang(x,y): | |
if math.atan2(y,x) < 0: | |
return (x,y,2.0*math.pi+math.atan2(y,x)) | |
else: | |
return (x,y,math.atan2(y,x)) | |
M = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main(){ | |
ios_base::sync_with_stdio(0); | |
char s[150]; | |
char vow[] = "aiyeou"; | |
char con[] = "bkxznhdcwgpvjqtsrlmf"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#define Inf 0x3f3f3f3f | |
using namespace std; | |
int dir[8][2] = { {-1,-1}, {0,-1}, {1,-1}, | |
{-1,0} , {1,0}, | |
{-1,1} , {0,1}, {1,1} }; | |
char mp[350][350]; | |
int sum[350][350]; | |
int vis[350][350]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//============================================================================ | |
// Name : minimum-path-sum.cpp | |
// Author : jiangkai | |
// Version : | |
// Copyright : | |
// Description : Hello World in C++, Ansi-style | |
//============================================================================ | |
#include <iostream> | |
#include <bits/stdc++.h> |
NewerOlder