목록Python (61)
정화 코딩

프로젝트 소개우리 팀 찹쌀떡은 졸업 프로젝트로 "취업 준비자를 위해 gpt-4o를 이용하여 자기소개서를 분석하고 RAG 기반으로 예상 질문을 제공하는 면접 시뮬레이션 서비스" PreView를 만들고자 한다. 개발을 진행함에 따라 AI 처리 전용 서버의 필요성을 느껴, 별도의 AI 서버를 구축하고 RAG 초기 세팅 및 백엔드 API 연동까지 진행하게 되었다. 이 글에서 그 전체 과정을 정리해보고자 한다.https://github.com/Chapssal-tteok Chapssal-tteokChapssal-tteok has 4 repositories available. Follow their code on GitHub.github.com AI 서버 레포지토리 생성 및 초기 세팅https://github.com..

https://www.acmicpc.net/problem/17386 #pythonimport sysinput = sys.stdin.readlinex1, y1, x2, y2 = map(int, input().split())x3, y3, x4, y4 = map(int, input().split())def ccw(x1, y1, x2, y2, x3, y3): ccw = (x1 * y2 + x2 * y3 + x3 * y1) - (x2 * y1 + x3 * y2 + x1 * y3) if ccw > 0: return 1 elif ccw ccw의 결과값을 통해 세 점의 위치 관계를 파악할 수 있다.ccw = (x1 * y2 + x2 * y3 + x3 * y1) - (x2 * y1 + x3 ..

12-1. 기하 알아보기 097. CCW (백준 11758번) https://www.acmicpc.net/problem/11758 import sysinput = sys.stdin.readlinex1, y1 = map(int, input().split())x2, y2 = map(int, input().split())x3, y3 = map(int, input().split())ccw = (x1 * y2 + x2 * y3 + x3 * y1) - (x2 * y1 + x3 * y2 + x1 * y3)if ccw > 0: print(1)elif ccw ccw의 결과값을 통해 세 점의 위치 관계를 파악할 수 있다. ccw = (x1 * y2 + x2 * y3 + x3 * y1) - (x2 * y1 + x3 ..

가장 긴 증가하는 부분 수열 (백준 11053번) https://www.acmicpc.net/problem/11053 import sysinput = sys.stdin.readlinen = int(input())a = list(map(int, input().split()))dp = [0 for _ in range(n)]maxa = 0for i in range(n): maxt = 0 for j in range(i): if a[i] > a[j]: maxt = max(maxt, dp[j]) dp[i] = maxt + 1 maxa = max(maxa, dp[i])print(maxa)dp[i] : 0부터 i까지 i를 포함하는 가장 길게 증가하는 수열의 길이앞의..

093. Dance Dance Revolution (백준 2342번) https://www.acmicpc.net/problem/2342 import sysinput = sys.stdin.readlinedata = list(map(int, input().split()))n = len(data) - 1l = [0 for _ in range(n + 1)]r = [0 for _ in range(n + 1)]p = [0 for _ in range(n + 1)]for i in range(n): if l[i] == data[i] or r[i] == data[i]: l[i + 1] = l[i] r[i + 1] = r[i] p[i + 1] = p[i] + 1 elif l[..

090. LCS 2 (백준 9252번) https://www.acmicpc.net/problem/9252 import sysinput = sys.stdin.readlinestr1 = input().strip()str2 = input().strip()len1 = len(str1)len2 = len(str2)dp = [[0 for _ in range(len2 + 1)] for _ in range(len1 + 1)]memo = [[0 for _ in range(len2 + 1)] for _ in range(len1 + 1)]for i in range(1, len1 + 1): for j in range(1, len2 + 1): if str1[i - 1] == str2[j - 1]: ..

A. 1, 2, 3 더하기 (백준 9095번) https://www.acmicpc.net/problem/9095 #pythonimport sysinput = sys.stdin.readlinet = int(input())dp = [0] * 12dp[1] = 1dp[2] = 2dp[3] = 4for i in range(4, 12): dp[i] = dp[i - 1] + dp[i - 2] + dp[i - 3]for _ in range(t): n = int(input()) print(dp[n])n을 1, 2, 3의 합으로 나타내려면 다음과 같은 경우의 수가 있다. (여기서 주의할 점은 1+2와 2+1가 다른 경우라는 것이다.)1) (n-1)까지 만들고 1을 더하기2) (n-2)까지 만들고 2를 더..

거리의 합 2 (백준 23330번) https://www.acmicpc.net/problem/23330문제 해석이런식으로 n개의 점이 수직선 위에 놓여 있고, 모든 점들의 쌍에 대해 두 점 사이의 거리의 합을 구하는 문제이다. 첫번째 풀이우선 가장 직관적인 풀이로 풀어보자. //C++#include #include #include using namespace std;int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; vector data(n); for (int i = 0; i > data[i]; } long long sum = 0; for (int i ..