알고리즘74 자바 알고리즘에서 자주 쓰이는 코드 https://redbinalgorithm.tistory.com/579 https://real-012.tistory.com/152 import java.io.*; import java.util.StringTokenizer; public class Main { static FastIO io = new FastIO(); public static void main(String[] args) throws IOException { try { // 문제 풀이 코드 } catch(Exception e) { e.printStackTrace(); } finally { io.flush(); io.close(); } } } class FastIO { static BufferedReader br; static Buffered.. 2021. 7. 26. size_t 언더플로우 주의 for (size_t i = 0; i = 0 && map[i - 1][j] != -1) { // A cout 2021. 7. 18. 백준 1463번 : 1로 만들기 문제 링크 : https://www.acmicpc.net/problem/1463 풀이에 참고한 링크 : https://www.acmicpc.net/board/view/66915 내 풀이(2021.6.26.) : DP #include #include using namespace std; int dp[1000000]; int main() { int N; cin >> N; for (int i = 2; i 2021. 6. 26. 백준 2839번 : 설탕 배달 문제 링크 : https://www.acmicpc.net/problem/2839 내 풀이(2021.6.26.) : DP #include #include using namespace std; int dp[5001]; int main() { int N; cin >> N; dp[0] = 0; dp[1] = 0; dp[2] = 0; dp[3] = 1; dp[4] = 0; dp[5] = 1; for (int i = 6; i 2021. 6. 26. 이전 1 2 3 4 5 ··· 19 다음