Skip to content

Instantly share code, notes, and snippets.

@hhc0null
hhc0null / gist:1551765
Created January 2, 2012 19:17
aoj-0004-Simultaneous_Equation.cpp
#include <iostream>
#include <iomanip>
#include <vector>
using namespace std;
// "dbg" means "debug"
/*
void fdbg(int *dbg) {
@hhc0null
hhc0null / gist:1554423
Created January 3, 2012 10:41
aoj-0004-Simultaneous_Equation-1.cpp
#include <iostream>
#include <iomanip>
#include <vector>
using namespace std;
void ve_calc(double* ary, double* ans) {
int i, j, tmp;
@hhc0null
hhc0null / gist:1554900
Created January 3, 2012 13:35
aoj-0004-Simultaneous_Equation-ans.cpp
#include <cstdio>
#include <iomanip>
using namespace std;
int main(void) {
double a, b, c, d, e, f, x, y, tmp;
for(;scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) == 6;) {
@hhc0null
hhc0null / gist:1605108
Created January 13, 2012 08:40
aoj-0005-GCD_and_LCM.cpp
#include <iostream>
#include <iomanip>
#include <cstdio>
using namespace std;
int main(void) {
unsigned long a, b, m, n, tmp, gcd, lcm;
@hhc0null
hhc0null / gist:1605525
Created January 13, 2012 10:53
aoj-0005-GCD_and_LCM-ans.cpp
#include <iostream>
#include <iomanip>
#include <cstdio>
using namespace std;
int main(void) {
long long int a, b, m, n, tmp, gcd, lcm;
@hhc0null
hhc0null / gist:1647441
Created January 20, 2012 13:46
aoj-0006-Reverse_Sequence.cpp
/*
both my legs itch...
help...
by the way, is my english sure?
*/
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <stack>
test
@hhc0null
hhc0null / gist:1748830
Created February 6, 2012 01:33
vimrc_kuzu
set nocompatible
filetype indent plugin on
syntax on
set autoindent
set nostartofline
set backspace=indent,eol,start
@hhc0null
hhc0null / gist:1779341
Created February 9, 2012 11:12
aoj-0007-Debt_Hell.cpp
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <stack>
using namespace std;
int main() {
int week, tmp, rep = 100000;
@hhc0null
hhc0null / gist:1964977
Created March 3, 2012 08:22
CTPC-A-Average.cpp
#include <cstdio>
int main() {
int a[4] = {0};
int sum = 0, max = 0;
for(int i = 0; i < 4; i++) {
scanf("%d", &a[i]);
max = (max < a[i])? a[i]: max;
sum += a[i];