Skip to content

Instantly share code, notes, and snippets.

View HyeonWooKim's full-sized avatar

HYEONWOO KIM HyeonWooKim

View GitHub Profile
@HyeonWooKim
HyeonWooKim / 1167.cpp
Created November 28, 2016 01:20
BOJ 1167
#include<iostream>
#include<vector>
#include<queue>
#include<string>
#include<cstring>
using namespace std;
class Node
{
public:
@HyeonWooKim
HyeonWooKim / 2966.cpp
Created November 28, 2016 00:56
BOJ 2966
#include<iostream>
#include<vector>
#include<queue>
#include<string>
using namespace std;
int main()
{
string a = "ABC", b = "BABC", c = "CCAABB", str;
int an = 3, bn = 4, cn = 6, ap = 0, bp = 0, cp = 0, r[3] = { 0 }, n, ans=0;
@HyeonWooKim
HyeonWooKim / 1939.cpp
Created November 28, 2016 00:48
BOJ 1939
#include<iostream>
#include<vector>
#include<queue>
using namespace std;
class Node
{
public:
int e, c;
Node() {}
@HyeonWooKim
HyeonWooKim / 2590.cpp
Created November 14, 2016 05:35
BOJ 2590
#include<iostream>
using namespace std;
int main()
{
int d[7], ans = 0, r;
for (int i = 1; i <= 6; i++) cin >> d[i];
ans += d[6] + d[5] + d[4];
d[1] -= 11 * d[5];
if (d[1] < 0) d[1] = 0;
@HyeonWooKim
HyeonWooKim / Codeforces Intel Code Challenge Final Round C.cpp
Created October 10, 2016 05:53
Codeforces Intel Code Challenge Final Round C.cpp
#include<iostream>
#include<cstdio>
#include<map>
#include<string>
#include<cstring>
#include<vector>
#include<queue>
#include<set>
#include<algorithm>
using namespace std;
@HyeonWooKim
HyeonWooKim / convex.cpp
Last active August 5, 2016 05:15
BOJ 1708 Convex hull
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<cmath>
using namespace std;
class Node
{
public:
vector<int> getKMPTable(string s)
{
int m = s.length();
vector<int> v(m, 0);
int begin = 1, matched = 0;
while (begin + matched < m)
{
if (s[begin + matched] == s[matched])
matched++,v[begin+matched - 1] = matched;
#include<iostream>
#include<algorithm>
#include<utility>
using namespace std;
pair<int, int> getp(int p)
{
long long x = 0, y = 0, cur = 1, step = 2;
while (p > cur)
#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<utility>
using namespace std;
double ncr(int n,int r)
{
double ans = 1;
@HyeonWooKim
HyeonWooKim / 1670.cpp
Last active March 23, 2016 20:10
정상 회담 2(BOJ 1670)
#include<iostream>
using namespace std;
long long dp[5002];
const long long MOD = 987654321;
int main()
{
int n;
cin>>n;
n/=2;
dp[0]=dp[1]=1;