Skip to content

Instantly share code, notes, and snippets.

View Chocochip101's full-sized avatar
🎯
Focusing

Kwoun Ki Ho Chocochip101

🎯
Focusing
View GitHub Profile
@Chocochip101
Chocochip101 / a1-README.md
Last active July 19, 2023 07:36 — forked from honux77/a1-README.md
소프티어 2nd 7월 19일 쪽지 시험
  • 이 gist를 fork 하고 답안을 작성해서 제출해 주세요.
  • 인터넷 검색, chat GPT 활용은 안 됩니다.
  • IDE는 사용할 수 있습니다.
  • 제출은 https://forms.gle/ER984HUpbHJYh7u39 폼을 이용해 주세요.
def dfs(x, y):
# 기저 사례
if x == 0 and y == 0:
return 1
if dist[x][y] == -1:
dist[x][y] = 0
for i in range(4):
nx, ny = x + dx[i], y + dy[i]
int cache[MAX][MAX];
int solve(int w, int h) {
//기저 사례
if (w == 0) return 1;
int& ret = cache[w][h];
if (ret != -1) return ret;
ret = 0;
if (w > 0)
#include <bits/stdc++.h>
#define endl "\n"
using namespace std;
int res = 0;
vector <int> weight;
bool compare(int x, int y) { return x > y; }
int main() {
ios::sync_with_stdio(false);
cout.tie(0); cin.tie(0);
import sys
n = int(sys.stdin.readline())
dp = [0, 1, 2]
for i in range(3, n+1):
dp.append((dp[i-1] + dp[i-2]) % 10007)
print(dp[n])
#include <bits/stdc++.h>
#define endl "\n"
using namespace std;
int cache[1001];
int solve(int n) {
if (n == 1) return 1;
if (n == 2) return 2;
int& ret = cache[n];
if (ret != -1) return ret;
@Chocochip101
Chocochip101 / 2021kakao_problem4.py
Last active October 14, 2021 08:22
Programmers_KAKAO_BLIND_RECRIUTMENT_2021
for t in range(n):
for i in range(n):
for j in range(i, n):
if i != j: #최소 비용 계산
temp = min(graph[i][j], graph[i][t] + graph[t][j])
graph[i][j] = graph[j][i] = temp
answer = INF
for t in range(n): #경유점에 따라 최소 합승 비용 탐색
temp = graph[s - 1][t] + graph[t][b - 1] + graph[t][a - 1]
@Chocochip101
Chocochip101 / 11722.py
Created March 30, 2021 07:01
BOJ_Solutions
import sys
input = sys.stdin.readline
n = int(input())
num = list(map(int, input().split()))
length = [0] * n
for i in range(n):
for j in range(i):
if num[j] > num[i] and length[j] > length[i]:
@Chocochip101
Chocochip101 / 1005.py
Created March 30, 2021 04:03
BOJ_Solutions
from collections import deque
from copy import deepcopy
import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
n, k = map(int, input().split())
time = [0]