Skip to content

Instantly share code, notes, and snippets.

View jiunbae's full-sized avatar
🏠
Working from home

Jiun Bae jiunbae

🏠
Working from home
View GitHub Profile
//
// rREF.h
//
// Reduced row echelon form via Gauss-Jordan elimination
// with partial pivoting.
//
// INPUT: vector<vector<T>> nxm matrix
//
// OUTPUT: rank
//
//
// BIT.h
//
// binary indexed tree
//
// INPUT: tree
//
// OUTPUT: query
//
// Time: O(log(2N))
//
// convex_hull.h
// DailyCodingTeamNote
//
// Created by MaybeS on 10/3/15.
// Copyright (c) 2015 Maybe. All rights reserved.
//
#pragma warning (disable :4996)
#pragma once
#include <utility>
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main(int argc, char * argv[])
{
ifstream in("self_introduce_number.in");
ofstream out("self_introduce_number.out");
int test; in >> test;
//int test; cin >> test;
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(int argc, char * argv[])
{
int test; cin >> test;
while(test--)
int MaximumFlow(const graph& g, int s, int t)
{
//maximum flow == return value
int maxflow = 0;
//res is Residual graph
vector<vector<int>> res(g.flow.begin(), g.flow.end());
//parent present where from
vector<int> parent(g.V, -1);
@jiunbae
jiunbae / CRAZY
Last active December 6, 2015 15:18
#include <fstream>
using namespace std;
int main(int argc, char * argv[])
{
if (argc < 2)
return -1;
string fname(argv[1]);
@jiunbae
jiunbae / go.bat
Last active December 10, 2015 10:34
@echo off
REM ""
REM "2015-12-08 MaybeS"
REM ""
SET version=1.0
SET found=""
SET iKey=%1
SET iPath=""
/**
segment tree with lazy propagation
init with (vector<T>)
use update to update value with range
query return value of operation defined oper function
*/
#include <iostream>
#include <cmath>
#include <vector>
@jiunbae
jiunbae / Red-Black Tree
Last active June 30, 2021 07:27
red black tree implementation in c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if defined(_WIN32) && defined(_MSC_VER)
#pragma warning (disable : 4996)
#endif
enum { RED, BLACK };