전체 글287

C Basics 1/ (열혈 C프로그래밍) 😍 이번 포스팅부터 윤성우 의 모든 내용을 차례차례 포스팅할 예정이다. 😍 처음으로 배웠던 C언어, 이제 끝까지 모든 개념을 제대로 정립한다는 의미로 진행해보자 1. 이것이 C언어다 ① 컴파일러는 인간이 작성한 C언어를 컴퓨터가 이해할 수 있는 기계어로 바꿔주는 역할을 담당한다. 즉 프로그래밍 언어란 사람과 컴파일러가 이해할 수 있는 약속된 형태의 언어 Q. What best describes the role of a compiler? (A) Debug one's code (B) Run the written program (C) Distinguish between functions and arguments (D) Turn source code into machine code ② C언어의 특징 → 절차지향.. C/Fundamentals 2023. 6. 25.
C fundamentals (1) ✊ C언어의 기초 본격적인 시작! 1) fundamentals //text-based language #include // in order to access printf function int main(void) { printf("Hello World\n"); return 0; } // source code -> compiler -> machine code(a.out & hello) → clang이라는 C언어 컴파일러를 사용해 main.c라는 C언어 파일을 컴파일한다 → 컴파일 결과 자동으로 a.out이라는 실행파일 생성 → 실행파일이므로 machine code, 즉 0과 1로 구성된 code이다 → .은 내가 현재 있는 위치, 현재 위치의 a.out 실행파일을 생성하기 위해 ./a.out 명령어 사용 .. C/Fundamentals 2023. 6. 16.
HTTPS(수정중) 1. What is HTTPS / SSL / TLS / CA ? ★ HTTPS ★ : a secured version of HTTP. when the exchange of data is encrypted with SSL/TLS, we call it HTTPS ('S' stands for secure) ① Privacy: no one can eavesdrop on messages ② Integrity: the message is not manipulated on the way to its destination ③ Identification: can check that the message is coming from computer(a digital signature) → HTTPS, via SSL cert.. Front-end/Internet 2023. 4. 12.
★Math & Geometry Upper-Beginner II - 19 Solved★ ★ 15818 오버플로우와 모듈러 ★import sysinput=sys.stdin.readlineN,M=map(int,input().split())nums=list(map(int,input().split()))ans=1for num in nums: ans*=(num%M)print(ans%M) 🤙 매우 큰 수에의 나머지를 구하는 건 큰 수 자체에 오버플로우 발생 가능성이 존재. 🤙 따라서 모듈러 연산을 활용! (A*B)%X = ((A%X)*(B%X))%X → 연산도중도중 곱해지는 수의 모듈러 결과를 구해 큰 수가 나오지 않게 과정 도중에 방지★ 16483 접시 안의 원 ★ print(round((int(input())/2)**2)) 🤙 아래의 그림으로 한 번에 설명된다★ 22938 백발백준하는 .. BOJ/🥉 2023. 4. 6.
HTML Fundamentals 1/ 1. HTML Intro ① HTML stands for Hyper Text Markup Language ② HTML is the standard markup language for creating Web pages ③ HTML describes the structure of a Web page ④ HTML consists of a series of elements ⑤ HTML elements tell the browser how to display the content ⑥ HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc. ⑦ HTML is not cas.. Front-end/HTML,CSS,JavaScript 2023. 3. 29.
Web Hosting What is Web Hosting? Web hosting is an online service that allows you to publish your website files onto the internet. So, anyone who has access to the internet has access to your website. Hosting = 'home of your web site', if you want a website, you'll need somewhere to host it hosting is a infrastructure, computer that keeps your website available across the internet Web Server(Web Host) Web S.. Front-end/Internet 2023. 3. 27.
Domain Name What is a Domain Name? A domain name is a unique, easy-to-remember address used to access websites, such as ‘google.com’, and ‘facebook.com’. Users can connect to websites using domain names thanks to the Domain Name System (DNS). Domain names are a key part of the Internet infrastructure. They provide a human-readable address for any web server available on the Internet. Any Internet-connected .. Front-end/Internet 2023. 3. 27.
DNS(Domain Name System) 1. What is DNS? 🤠 The Domain Name System (DNS) is the phonebook of the Internet. Humans access information online through domain names, like nytimes.com or espn.com. Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load Internet resources. (When you enter a domain name into your web browser, your computer sends a DNS quer.. Front-end/Internet 2023. 3. 22.
HTTP(수정중) 1. What is HTTP? HTTP is a TCP/IP - based application layer communication protocol that standardizes how clients and servers communicate with each other. It defines how content is requested and transmitted across the internet. By application layer protocol, I mean that it's simply an abstraction layer that standardizes how hosts (clients and servers) communicate. HTTP itself depends on TCP/IP to.. Front-end/Internet 2023. 3. 20.
★DAC 중상급1 - 3문제()★ 🍴 DAC 분할정복 문제는 주로 재귀를 사용해 여러 개의 sub-problem을 돌리고 차례차례 해결해나가는 경우가 많다. 중상급 이상의 난이도부터 차례대로 탐색해보자! 🍴 아래 DAC 이론 포스팅 참조 Divide&Conquer(DAC) intro> 🍻 분할(Divide)하고 정복(Conquer)하는 이 알고리즘은 문제를 풀 때의 접근 방식으로 분할 → 정복 → 결합 크게 세 단계로 진행된다. 🍻 ① 분할(Divide): 주어진 문제를 더 작은 여러 개의 sub-pr sh-avid-learner.tistory.com ★ 2630 색종이 만들기 ★ import sys input=sys.stdin.readline N=int(input()) W,B=0,0 confetti=[] def is_check(arr).. BOJ/🥈 2023. 3. 20.
Divide&Conquer(DAC) intro> 🍻 분할(Divide)하고 정복(Conquer)하는 이 알고리즘은 문제를 풀 때의 접근 방식으로 분할 → 정복 → 결합 크게 세 단계로 진행된다. 🍻 ① 분할(Divide): 주어진 문제를 더 작은 여러 개의 sub-problem으로 분할한다. ② 정복(Conquer): 재귀적으로 sub-problem들을 각각 해결한다. ③ 결합(Combine): 각각의 sub-problem 해결 결과를 묶어 전체 문제의 최종 솔루션을 도출! 🍻 divide & conquer 접근법을 사용하는 대표 알고리즘 모음(각각의 별도 포스팅 참조) ① Quicksort ② Merge Sort ③ Closest Pair of Points ④ Strassen's Algorithm ⑤ Cooley-Tukey Fast Fo.. Computer Science/Algorithms 2023. 3. 20.
Packets & Protocols ※ Internet Introduction ※ The Internet Explained 1. What is the internet? The internet is the world’s most popular computer network. It began as an academic research project in 1969, and became a global commercial network in the 1990s. Today it is used by more than 2 billion people around the world. Th sh-avid-learner.tistory.com 1. What is a packet? & protocols? ① packet A packet is the basic u.. Front-end/Internet 2023. 3. 14.
The Internet Explained 1. What is the internet? The internet is the world’s most popular computer network. It began as an academic research project in 1969, and became a global commercial network in the 1990s. Today it is used by more than 2 billion people around the world. The internet is notable for its decentralization. No one owns the internet or controls who can connect to it. Instead, thousands of different orga.. Front-end/Internet 2023. 3. 14.
★Number Theory Upper-Intermediate I - 8 Solved★ ★ 1850 최대공약수 ★import mathA,B = map(int, input().split())ans = ''.join(['1']*math.gcd(A,B))print(ans) 👑 1의 개수 A와 B의 최대공약수만큼 1이 나열되어 있는 수가 최대공약수. 최대공약수 성질 / 유클리드 호제법을 사용해 이를 증명해보자 ※ 1이 a개 있는 수와 1이 b개 있는 수의 최대공약수는 1이 gcd(a,b)개 있는 수 (a≥b)※ - 증명 - → 1이 a개 있는 수를 $S_a$, 1이 b개 있는 수를 $S_b$라고 하면$$S_a = \underbrace{111 ... 111}$$(1이 a개)$$S_b = \underbrace{111 ... 111}$$(1이 b개) → 아래와 같.. BOJ/🥈 2023. 2. 28.
Probability fundamentals 🧜‍♀️ 확률은 반드시 알아야 하는 기초 개념! 기초 개념을 확실히 알자! * 용어 정리 🧜‍♀️ 확률 'the measure of the likelihood that an event will occur' 🧜‍♀️ 시행(experiment, trial) → 확률에서의 '시행'은 일반적으로 무작위 시행을 의미하여, 이는 동일한 조건에서 반복 수행 가능, 그 결과를 사전에 알 수 없는 행동 (ex) 동전과 주사위를 던지는 것) → 시행은 표본공간이라는 집합(set)으로 표현 🧜‍♀️ 표본공간(Sample space) → 어떠한 시행에서 일어날 수 있는 모든 발생 가능한 결과의 집합 ex) 주사위를 한 번 던지는 시행의 표본 공간 = {1, 2, 3, 4, 5, 6} → 각 원소(element)는 시행의 특정.. Math & Linear Algebra/Concepts 2023. 2. 27.
중국인의 나머지 정리(CRT;Chinese Remainder Theorem) 🙆🏽‍♀️ 언젠가 한 번은 정확히 정리하고, 숙지해야 할 알고리즘 '중국인의 나머지 정리' 🙆🏽‍♀️ 이론을 정확히 알고, 여러 수학 문제에 적용해 복잡한 문제를 쉽게 풀어보자 합동식 🙆🏽‍♀️ 대수학에서 합동인 두 수는, 어떤 수로 나누었을 때 나머지가 같은 두 수를 뜻한다. → ex) 예를 들어 12와 26은 7로 나누었을 때 나머지가 5이므로 아래와 같은 기호로 쓸 수 있다. $$12\equiv 26\;(mod\;7)$$ 🙆🏽‍♀️ 즉, a를 p로 나눈 나머지와 b를 p로 나눈 나머지가 같다면, $$a\equiv b\;(mod\;p)$$ 🙆🏽‍♀️ 이를 식으로 표현한다면, $a=pn+b$ * 합동식의 성질 ① 덧셈은 언제나 성립 (동일한 수를 더하면 동일한 수의 나머지는 당연히 동일하므로 성립) $.. Computer Science/Algorithms 2023. 2. 26.
SVD(Singular Value Decomposition) 🩴 저번 선형대수학 포스팅에서는 고유벡터 분해 eigendecomposition에 대해 배웠다. eigendecomposition 🤾🏽‍♂️ 저번 시간에 eigenvalue와 eigenvector에 대해 학습했다. eigenvalue & eigenvector * intro 🔅 위에서 배운 transform 연산에서 transformation에 영향을 받지 않는 부분, 즉 transform을 해도 방향이 변하지 sh-avid-learner.tistory.com 🩴 이번에는 유사한 분해 '특잇값 분해(Singular Values Decomposition)'에 대해서 알아보려 한다. SVD 정의 "모든 mxn matrix는 $A = U \Sigma V^T$ 형태로 분해된다." ※ eigendecompositi.. Math & Linear Algebra/Concepts 2023. 2. 20.
eigendecomposition 🤾🏽‍♂️ 저번 시간에 eigenvalue와 eigenvector에 대해 학습했다. eigenvalue & eigenvector * intro 🔅 위에서 배운 transform 연산에서 transformation에 영향을 받지 않는 부분, 즉 transform을 해도 방향이 변하지 않는 벡터(값은 변할 수 있음)를 '고유벡터(eigenvector)' (※ 벡터의 차원에서는 transfo sh-avid-learner.tistory.com 🤾🏽‍♂️ 이 두 가지 개념을 사용해 eigen decomposition을 간단히 알아보려 함 eigendecomposition이란? 🤾🏽‍♂️ 정의 $$A = V \Lambda V^{-1}$$ · A: nxn 정사각행렬 · V: A의 고유벡터들을 열로 갖는 행렬 · $\.. Math & Linear Algebra/Concepts 2023. 2. 19.
★BFS&DFS Upper-Intermediate I - 14 Solved★ ★ 11724 연결 요소의 개수 ★ 《그래프 연결요소》 ☝️ DFS import sys input=sys.stdin.readline sys.setrecursionlimit(10000) N,M=map(int,input().split()) #dfs def dfs(graph,start,visited): visited[start] = True for node in graph[start]: if not visited[node]: dfs(graph,node,visited) #graph graph=[[] for _ in range(N+1)] for _ in range(M): u,v=map(int,input().split()) graph[u].append(v) graph[v].append(u) #visited visi.. BOJ/🥈 2023. 2. 17.
★BFS&DFS Intermediate I - 17 Solved★ DFS / BFS ① DFS(Depth-First Search) ⚡️ 먼저 DFS는 깊이 우선 탐색이라고도 부르며, 그래프에서 깊은 부분을 우선적으로 탐색하는 알고리즘 ⚡️ 스택 자료구조(또는 재귀함수)를 이용하며, 구체적인 동작 과 sh-avid-learner.tistory.com 🙆‍♂️ 그래프로 표현되는 여러 상황에서, 각 node의 visited 유무를 따질 때 그래프 탐색 방법에 따라 DFS / BFS로 나뉨 🙆‍♂️ 깊이있게 먼저 탐색하자면 DFS / 가까운 것 먼저 탐색하자면 BFS 🙆‍♂️ DFS / BFS 모두 딱! 3가지의 준비물 필요 ※ 이 때 DFS는 stack 사용 / BFS는 queue를 사용하므로 BFS 사용 시 deque import ※ ① 2차원 graph (각 node별로.. BOJ/🥈 2023. 2. 17.
★Combinatorics Intermediate I - 3 Solved★ ★ 2407 조합 ★ import math n,m=map(int,input().split()) print(math.factorial(n) // (math.factorial(n-m) * math.factorial(m))) 👻 위 공식만 정확히 알고 있으면 끝! ★ 9375 패션왕 신해빈 ★ import sys input=sys.stdin.readline for _ in range(int(input())): n=int(input()) fashion={} if n==0: print(0) else: for _ in range(n): clothes=input().split() if clothes[1] in fashion: fashion[clothes[1]]+=1 else: fashion[clothes[1]] = .. BOJ/🥈 2023. 2. 16.
★Set/Map Intermediate I - 13 Solved★ ★ 1620 나는야 포켓몬 마스터 이다솜 ★ import sys input=sys.stdin.readline pokemon={} N,M=map(int,input().strip().split()) for i in range(N): pokemon[input().strip()]=i+1 pokemon_list=list(pokemon.keys()) for _ in range(M): problem=input().strip() if problem.isalpha():print(pokemon[problem]) else:print(pokemon_list[int(problem)-1]) 😽 포켓몬 번호를 말하면 포켓몬 이름을 출력하고, 반대로 포켓몬 이름을 말하면 포켓몬 번호를 출력하는, 즉 두 가지 정보 포켓몬 번호와 포켓.. BOJ/🥈 2023. 2. 15.
vector similarity 🧙🏻 scalar & vector fundamentals 포스팅에서 scalar와 vector의 개념에 대해 간단히 살펴보았다. Scalar & Vector (fundamentals) ▶ Linear Algebra 하면? 당연히 알아야 할 기본은 'Scalar(스칼라)' & 'Vector(벡터)' & 'Matrix(행렬)' ◀ 1. Scalar * concepts = "단순히 변수로 저장되어 있는 숫자" → vector 혹은 matrices에 곱해지는 경우 해당 값 sh-avid-learner.tistory.com 🧙🏻 이제는 여러 가지 vector similarity 개념에 대해서 알아보자! 🧙🏻 데이터 분석에서의 vector는 각 관측치의 변수(특성) 정보를 이용하여 관측치를 하나의 vector로 표.. Math & Linear Algebra/Concepts 2023. 2. 9.
★Binary Search Upper-Intermediate I - 4 Solved★ 😻 이분탐색 알고리즘을 적용해야 함을 인지하는 부분이 제일 중요하다. 이분탐색을 풀어야 하는 문제의 판별법은 ① 노가다성이 들어간다. 일단, 내가 원하고자 하는, 무언가를 일일이 문제의 조건을 충족해가며 비교해가는 과정이 들어간다면 이분탐색 또는 매개변수 탐색 유형임을 고려해보자 ② ~자르기와 같은 주어진 최소, 최대 일렬로 나열된 줄에서 범위를 줄여가며 최종 target(point일 수도 있고, 주어진 범위의 길이일 수도 있다)을 찾는 문제라면 이분탐색을 고려해보자 ★ 1654 랜선 자르기 ★ import sys input=sys.stdin.readline K,N=map(int,input().split()) ls=[int(input())for _ in range(K)] start,end=1,max(ls.. BOJ/🥈 2023. 2. 9.
jupyter notebook markdown *수시 업데이트 🫰 markdown에서 유용하다고 생각하는 부분 문법 내용 수시로 업데이트 🫰 ★ font color / 형광펜 ★ red green This is a green colored box This is a red colored box This is a yellow colored box This is a blue colored box ★ 하이퍼링크 ★ [Google](https://www.google.com/) ★ LaTex 수학 문법 ★ → $ 양쪽에 두 개는 가운데 정렬 → $ 양쪽에 한 개는 왼쪽 정렬 ※ latex 여러 기호 참조 (지속적 update) ※ 🧜🏻‍♂️ LaTex Grammers compilation * 까먹지 않으려고 모아둠 🌟 ⭐️ 분수 쓰기 (A 분자, B 분모) ⭐️ \cfrac{.. Computer Science/Basics 2023. 2. 7.
★정렬 최상급1 - 1문제()★ 🏅 플래티넘 이상의 난이도는 각 문제의 접근방향 뿐만 아니라, 사고과정 흐름까지 최대한 리마인드하는 방식으로 기억하자! 🏅 정렬관련 포스팅 하단 참조 🏅 정렬에는 정말 많은 알고리즘이 있다. 플래이상의 난이도급 문제에서 정렬을 어떤 방식으로 접근하는 지 알아보자 ★ 2220 힙 정렬 ★ import math n = int(input()) if n==1:print(1) elif n==2:print(2,1) elif n==3:print(3,2,1) else: arr = [3,2,1] for i in range(n-3): end=int(math.log(i+3,2)) idx=len(arr)-1 for _ in range(end): arr[idx],arr[(idx-1)//2]=arr[(idx-1)//2],arr[.. BOJ/🏅 2023. 2. 7.
Binary heap 👨‍🏫 우선순위 큐는 max-heap 또는 min-heap을 사용해 우선순위에 맞는 데이터를 뽑을 수 있는 자료구조임을 공부했다. (아래 포스팅 참조) priority queue - (binary) heap tree 1. concepts> ☝️ 우선순위 큐 = '우선순위가 가장 높은 데이터를 가장 먼저 삭제하는 자료구조' ☝️ 데이터를 우선순위에 따라 처리하고 싶을 때 사용 ex) 물건 데이터를 자료구조에 넣었다가 가 sh-avid-learner.tistory.com ☝️ priority queue는 일종의 Abstract Data Structure(ADT)로, 추상화된 개념을 heap이라는 자료구조로 implement할 수 있다. (우선순위가 최대 먼저, 또는 최소 먼저일 경우 heap은 트리 구조를 .. Computer Science/Data Structures 2023. 2. 6.