Instantly share code, notes, and snippets.

💭
💻

# Joona Yoonjoonas-yoon

💭
💻
• Sort options
Created Jul 6, 2020
UVa 136, POJ 1338 - Ugly Numbers
View uva-136-ugly-numbers.cpp
 #include #include #include using namespace std; typedef long long lld; struct node { node(lld d, int p) : data(d), prev(p) {} lld data;
Last active Jun 9, 2020
BOJ 11012 - Egg
View boj-11012.cpp
 #include using namespace std; #define FOR(i, n) for(int i=0; i<(n); ++i) #define REP(i, a, b) for(int i=(a); i<(b); ++i) #define all(v) (v).begin(), (v).end() #define SIZE(v) ((int)(v).size()) typedef long long lld; typedef pair ii;
Last active Jun 9, 2020
문제적 남자 95화 - 리모트 뷰잉 뇌풀기 - 4번 문제
View hot-brains-e95-4.py
 from itertools import permutations # AB*C = DE-F = GH/I def validate(a): ABC = (10*a[0] + a[1]) * a[2] DEF = (10*a[3] + a[4]) - a[5] if ABC != DEF: return False GH, I = 10*a[6] + a[7], a[8] if GH % I != 0 or ABC != (GH / I):
Last active Jun 4, 2020 — forked from Kronuz/gtest.rb
View gtest.rb
Created May 24, 2020
BOJ 3640 - 제독
View boj-3640.cpp
 #include using namespace std; typedef long long lld; typedef pair ii; const int INF = 0x3f3f3f3f; const lld LNF = 0x3f3f3f3f3f3f3f3f; const int MOD = 1e9 + 7;
Created May 15, 2020
BOJ 15480 - LCA와 쿼리
View boj-15480.cpp
 #include using namespace std; #define MAX_N 100001 #define MAX_DEP 18 int N; vector adj[MAX_N]; int depth[MAX_N]; int parent[MAX_N][MAX_DEP]; // N번째 노드의 2^K번째 부모 노드
Created May 13, 2020
using Eulerian path
View eulerian-path.cpp
 #define MAX_V 100001 int id = 0; int L[MAX_V], R[MAX_V]; // [L, R] vector adj[MAX_V]; int dfs(int cur) { int i = ++id, cnt = 0; L[cur] = i; for (auto& nxt : adj[cur]) {
Created May 1, 2020
BOJ 9034 - 순위
View boj-9034.cpp
 #include using namespace std; #define all(v) (v).begin(),(v).end() struct seg { int n; vector t; void build(int sz) {
Created Apr 17, 2020
BOJ 1539 - 이진 검색 트리
View 1539.cpp
 #include using namespace std; #define FOR(i, n) for(int i=0; i<(n); ++i) typedef long long lld; map h1, h2; int main() {
Created Apr 2, 2020
BOJ 18109 - 도깨비불 (오토마타 풀이)
View boj-18109-automata.cpp
 #include using namespace std; #define CONSO 0 #define VOWEL 1 #define COMBINE_C 2 #define COMBINE_V 3 bool isVowel[255]; set cVowel, cConso;
You can’t perform that action at this time.