Home
MINJUN
Cancel

BOJ. Baby Shark (16236)

[Link] https://www.acmicpc.net/problem/16236 #include <algorithm> #include <iostream> #include <vector> #include <queue> // #include<bits/stdc++.h> using namespace ...

BOJ. Chicken Delivery (15686)

[Link] https://www.acmicpc.net/problem/15686 #include <algorithm> #include <iostream> #include <vector> using namespace std; typedef long long ll; const int INF = 987654321; in...

BOJ. Longest Palindrome Substring (13275)

[Link] https://www.acmicpc.net/problem/13275 Manacher Algorithm #include <algorithm> #include <iostream> #include <vector> using namespace std; typedef long long ll; const int...

BOJ. Reason the fox came up to Island (17131)

[Link] https://www.acmicpc.net/problem/17131 Lazy propagation with non recursive segment tree. There was no code sample of using lazy propagation with recursive segment tree so I’ll share this c...

LeetCode. 43. Multiply Strings

[Link] https://leetcode.com/problems/multiply-strings/ class Solution { public String multiply(String num1, String num2) { StringBuilder sb = new StringBuilder(); int len1 ...

BOJ. Minimum Value (10999)

[Link] https://www.acmicpc.net/problem/10999 Lazy propagation with non recursive segment tree. There was no code sample of using lazy propagation with recursive segment tree so I’ll share this c...

BOJ. Histogram (1725)

[Link] https://www.acmicpc.net/problem/1725 #include <algorithm> #include <iostream> using namespace std; typedef long long ll; const int N = 1e5 + 1; int seg[2 * N]; ll h[N]; int n;...

BOJ. Sum of numbers 7 (2268)

[Link] https://www.acmicpc.net/problem/2268 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e6+1; ll seg[2*N]; int n; void modify(int pos, int v){ for(se...

BOJ. Coffe Shop (1275)

[Link] https://www.acmicpc.net/problem/1275 import java.util.*; import java.io.*; public class Main { static BufferedReader br; static StringBuilder sb = new StringBuilder(); static long[] s...

BOJ. Minimum Value (10868)

[Link] https://www.acmicpc.net/problem/10868 import java.util.*; import java.io.*; public class Main { static BufferedReader br; static StringBuilder sb = new StringBuilder(); static int[] s...