Loading [MathJax]/jax/output/CommonHTML/jax.js

전체 글337

C Basics 3/ (열혈 C프로그래밍) 😵 이번 세 번째 포스팅에서는 본격적인 코딩을 위한 다양한 분기문 / 반복문을 배우자! 그리고 함수까지 배우며 Part 01을 마무리하려 한다! 6장부터 10장까지 다룰 예정! 6. printf함수와 scanf함수 정리하기 ① 여러 특수문자의 출력 → 큰 따옴표 자체의 출력을 원하면 앞에 \를 붙여준다. → \n은 개행 → \\ 역슬래쉬 자체를 출력 → \'은 작은 따옴표를 출력 → \t는 수평 탭 효과 ② printf의 f는 formatted(서식이 지정된) 형태의 출력을 뜻한다. %d는 10진수 정수로 출력, %X는 16진수로 출력(알파벳은 대문자) %x는 16진수로 출력(알파벳은 소문자) 서식문자 출력 대상(자료형) 출력 형태 %d char, short, int 부호 있는 10진수 정수 %ld lo.. C, C++/Fundamentals 2023. 6. 27.
C Basics 2/ (열혈 C프로그래밍) 🥸 저번 포스팅에서 1장부터 3장까지 다루었다. 이번 포스팅에서는 4장부터 5장까지 다루자! 4. 데이터 표현방식의 이해 ① 진법의 이해 → 2진수는 두 개의 기호(0과 1)를 이용해 데이터를 표현하는 방식. 컴퓨터는 2진수를 기반으로 데이터를 표현하고 연산 진행 → 이와 유사하게 10진수는 10개의 기호 / 16진수는 16개의 기호(1부터 10까지의 숫자 + A ~ F 대소문자 구분 x)를 사용 ex) 즉 10진수로 10은 16진수로 A로 표현하고 / 10진수로 17은 16진수로 11로 표현한다 Q. 16진수가 필요한 이유? → 2진수로만 표현하면 데이터의 길이가 길어지므로 한눈에 파악하기 어려움. 따라서 2진수 네 개는 16진수 1개로 간결히 표현 가능하므로 16진수를 많이 사용 ② 데이터의 표현 단.. C, C++/Fundamentals 2023. 6. 26.
C Basics 1/ 😍 처음으로 배웠던 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, 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, 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.
★Divide & Conquer Upper-Intermediate I - 9 Solved★ ★ 2630 색종이 만들기 ★import sysinput=sys.stdin.readlineN=int(input())W,B=0,0confetti=[]def is_check(arr): side=len(arr) if all(arr[i][j] == 0 for i in range(side) for j in range(side)): return 'W' elif all(arr[i][j] == 1 for i in range(side) for j in range(side)): return 'B' else: return 0def get_confetti(arr,l,W,B): if l == 1: if arr[0][0] == 0: W+=1 .. BOJ/🥈 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 - 9 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$라고 하면Sa=111...111(1이 a개)Sb=111...111(1이 b개) → 아래와 같이 10의 지수승으로 나열할 수 있다... 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이므로 아래와 같은 기호로 쓸 수 있다. 1226(mod7) 🙆🏽‍♀️ 즉, a를 p로 나눈 나머지와 b를 p로 나눈 나머지가 같다면, ab(modp) 🙆🏽‍♀️ 이를 식으로 표현한다면, $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ΛV1 · A: nxn 정사각행렬 · V: A의 고유벡터들을 열로 갖는 행렬 · $\.. Math & Linear Algebra/Concepts 2023. 2. 19.
★BFS&DFS Intermediate I - 20 Solved★ 🙆‍♂️ 그래프로 표현되는 여러 상황에서, 각 node의 visited 유무를 따질 때 그래프 탐색 방법에 따라 DFS / BFS로 나뉨 🙆‍♂️ 깊이있게 먼저 탐색하자면 DFS / 가까운 것 먼저 탐색하자면 BFS 🙆‍♂️ DFS / BFS 모두 딱! 3가지의 준비물 필요 ※ 이 때 DFS는 stack 사용 / BFS는 queue를 사용하므로 BFS 사용 시 deque import ※ ① 2차원 graph (각 node별로 연결된 node의 번호가 list로 저장됨)② visited 여부 1차원 list (최종적으로 방문되었는 지 확인)③ 시작 node★ 1260 DFS와 BFS ★ import sysinput = sys.stdin.readlinefrom collections import dequ.. BOJ/🥈 2023. 2. 17.
★Combinatorics Intermediate I - 5 Solved★ ★ 2407 조합 ★import mathn,m=map(int,input().split())print(math.factorial(n) // (math.factorial(n-m) * math.factorial(m)))👻 위 공식만 정확히 알고 있으면 끝!  ★ 9375 패션왕 신해빈 ★import sysinput=sys.stdin.readlinefor _ 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: .. BOJ/🥈 2023. 2. 16.
★Set/Map Intermediate I - 14 Solved★ ★ 1620 나는야 포켓몬 마스터 이다솜 ★ import sysinput=sys.stdin.readlinepokemon={}N,M=map(int,input().strip().split())for i in range(N): pokemon[input().strip()]=i+1pokemon_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 - 6 Solved★ 😻 이분탐색 알고리즘을 적용해야 함을 인지하는 부분이 제일 중요하다. 이분탐색을 풀어야 하는 문제의 판별법은 ① 노가다성이 들어간다. 일단, 내가 원하고자 하는, 무언가를 일일이 문제의 조건을 충족해가며 비교해가는 과정이 들어간다면 이분탐색 또는 매개변수 탐색 유형임을 고려해보자 ② ~자르기와 같은 주어진 최소, 최대 일렬로 나열된 줄에서 범위를 줄여가며 최종 target(point일 수도 있고, 주어진 범위의 길이일 수도 있다)을 찾는 문제라면 이분탐색을 고려해보자★ 1654 랜선 자르기 ★ import sysinput=sys.stdin.readlineK,N=map(int,input().split())ls=[int(input())for _ in range(K)]start,end=1,max(ls) #0.. BOJ/🥈 2023. 2. 9.
jupyter notebook markdown *수시 업데이트 🫰 markdown에서 유용하다고 생각하는 부분 문법 내용 수시로 업데이트 🫰 ★ font color / 형광펜 ★redgreen This is a green colored boxThis is a red colored boxThis is a yellow colored boxThis is a blue colored box ★ 하이퍼링크 ★[Google](https://www.google.com/) ★ LaTex 수학 문법 ★→ $ 양쪽에 두 개는 가운데 정렬→ $ 양쪽에 한 개는 왼쪽 정렬 ※ latex 여러 기호 참조 (지속적 update) ※ 🧜🏻‍♂️ LaTex Grammers compilation* 까먹지 않으려고 모아둠 🌟 ⭐️ 분수 쓰기 (A 분자, B 분모) ⭐️ \cfrac{A}{B.. Computer Science/Basics and Concepts 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.
Linear Equation & Linear System / Rank & det(A) Linear Equation 👐🏻 선형 방정식이란, 변수 $x_1, x_2, .. x_n$이 있고, $a_1x_1 + a_2x_2 + ... + a_nx_n = b$로 나타낼 수 있는 방정식을 뜻한다. (b와 계수 a_1, a_2, ~ a_n은 실수 또는 복소수) 👐🏻 위 equation은 이렇게도 표현 가능하다. $a^Tx = b$ a=[a1a2an],x=[x1x2xn] Linear System 👐🏻 선형 시스템은 앞서 설명한 linear equation이 1개 이상 구성된 시스템을 뜻한다 👐🏻 예시) ID A B.. Math & Linear Algebra/Concepts 2023. 2. 1.