From 2c88249a7bbc32acc21f70eab92d2a053bce3376 Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Wed, 28 Jan 2026 19:56:10 +0900 Subject: [PATCH] baekjoon 20260128 --- code_study/Baekjoon/python/10569.py | 1 + code_study/Baekjoon/python/11053.py | 11 +++++++++++ code_study/Baekjoon/python/11444.py | 26 ++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 code_study/Baekjoon/python/10569.py create mode 100644 code_study/Baekjoon/python/11053.py create mode 100644 code_study/Baekjoon/python/11444.py diff --git a/code_study/Baekjoon/python/10569.py b/code_study/Baekjoon/python/10569.py new file mode 100644 index 0000000..a063d82 --- /dev/null +++ b/code_study/Baekjoon/python/10569.py @@ -0,0 +1 @@ +print('\n'.join(list(map(str, [(lambda x : 2 - x[0] + x[1])(list(map(int, input().split()))) for _ in range(int(input()))])))) \ No newline at end of file diff --git a/code_study/Baekjoon/python/11053.py b/code_study/Baekjoon/python/11053.py new file mode 100644 index 0000000..8e83cb8 --- /dev/null +++ b/code_study/Baekjoon/python/11053.py @@ -0,0 +1,11 @@ +N = int(input()) +A = list(map(int, input().split())) + +dp = [1]*N + +for i in range(N) : + for j in range(i) : + if(A[i] > A[j]) : + dp[i] = max(dp[i], dp[j] + 1) + +print(max(dp)) \ No newline at end of file diff --git a/code_study/Baekjoon/python/11444.py b/code_study/Baekjoon/python/11444.py new file mode 100644 index 0000000..b2e8321 --- /dev/null +++ b/code_study/Baekjoon/python/11444.py @@ -0,0 +1,26 @@ +MOD = 1000000007 + +def multiply_matrix(a, b) : + result = [[0,0],[0,0]] + + for i in range(2) : + for j in range(2) : + temp = 0 + for k in range(2) : + temp += a[i][k]*b[k][j] + result[i][j] = temp%MOD + + return result + +def power_matrix(adj, N) : + if N == 1 : + return adj + + half = power_matrix(adj, N//2) + + if N%2 == 0 : + return multiply_matrix(half, half) + else : + return multiply_matrix(multiply_matrix(half, half), adj) + +print(power_matrix([[1,1], [1,0]], int(input()))[1][0]%MOD) \ No newline at end of file