전체 글 - Table of Contents332

(C++)★Sorting Upper-Beginner I - 1 Solved★ ★ 2750 수 정렬하기 ★//1436#include #include #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N; cin >> N; vector arr{}; while(N--){ int x; cin >> x; arr.push_back(x); } sort(arr.begin(),arr.end()); for(int x=0;x 👯‍♂️ vector arr{}로 가변 배열 만들고 push_back()으로 업데이트. 이.. C, C++/🥉 BOJ 2024. 11. 14.
(C++)★BF Intermediate I - 1 Solved★ ★ 1436 영화감독 숌 ★//1436#include #include #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N, n = 666, cnt = 1; string n_string; bool found = false; cin >> N; while(true){ n_string = to_string(n); found = false; for(int x = 0; x  🧕🏼 주어진 숫자를 문자열 string으로 바꾸는 to_stri.. C, C++/🥈 BOJ 2024. 11. 14.
(C++)★Math & Geometry Upper-Beginner I - 1 Solved★ ★ 14215 세 막대 ★//14215#include #include #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int arr[3]; cin >> arr[0] >> arr[1] >> arr[2]; sort(arr, arr+3); if((arr[0]+arr[1]) 🤙 sort(arr, arr+3)로 주어진 배열의 길이를 sorting할 수 있다. 🤙 cin >> arr[0] >> arr[1] >> arr[2]로 직접 입력한 숫자 자체를 바로 배열에 넣을 수 있다. .. C, C++/🥉 BOJ 2024. 11. 14.
(C++) ★Number Theory Upper-Beginner I - 3 Solved★ ★ 9506 약수들의 합 ★//9506#include #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n,total; while(1){ cin >> n; if(n==-1){ break; } total = 1; vector numbers = {}; for(int x=2;x 🧚‍♂️ 가변 배열 vector numbers = {} 만들어 놓고, 약수일 때 numbers.push_back(x); 사용.. C, C++/🥉 BOJ 2024. 11. 14.
(C++) ★Implementation&Simulation Intermediate I - 2 Solved★ ★ 2941 크로아티아 알파벳 ★//2941#include #include #include #include using namespace std;int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string S; int x; cin >> S; vector arr = {"c=","c-","dz=","d-","lj","nj","s=","z="}; for(int i =0 ; i  🤝 vector으로 문자열이 들어간 배열을 생성(#include ) 🤝 find() 함수 안에 크로아티아 변경된 알파벳 문자열을 넣으면, 해당 문자열이 들어가는 위치를 index로 알 수 있다... C, C++/🥈 BOJ 2024. 11. 14.
(C++) ★Implementation Upper-Beginner I - 8 Solved★ ★ 10811 바구니 뒤집기 ★#include #include using namespace std;void swap(int *a, int *b){ int tmp = *a; *a = *b; *b = tmp;}int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N, M; cin >> N >> M; int* basket = new int[N]; for(int x = 0; x > i >> j; for(int a = 0; a  🤝 바구니 i부터 바구니 j까지 역순으로 넣는 방법은, iterator x가 바구니 i부터 (i+j)/2까지 돌며 양 옆(x와 을.. C, C++/🥉 BOJ 2024. 11. 13.
(C++) ★Implementation Beginner I - 28 Solved★ ★ 1330 두 수 비교하기 ★//1330#include #include using namespace std;int main(int argc, char const *argv[]) { int A, B; cin >> A >> B; if (A > B){ cout ' ★ 9498 시험 성적 ★#include #include using namespace std; int main(int argc, char const *argv[]){ int score; cin >> score; if(score >= 90){ cout = 80){ cout = 70){ cout = 60){ cout ★ 2753 윤년 ★#include #.. C, C++/🥉 BOJ 2024. 11. 13.
(C++) ★Basics I - 16 Solved★ ★ 2557 Hello World ★#include using namespace std;int main(){ cout ★ 1000 A + B ★ / ★ 1001 A - B ★ / ★ 10998 A x B ★#include using namespace std;int main(){ int A, B; cin >> A; cin >> B; cout ★ 1008 A / B ★#include using namespace std;int main(){ double A, B; cin >> A >> B; cout.precision(12); cout  🤝 cout.precision(12)으로 실수 전체를 12자리로 표현하겠다는 뜻.🤝 fixed 써서 12자리로 고정한 숫자로.. C, C++/🥉 BOJ 2024. 11. 13.
💐Operating Systems Fundamentals 2 - Process 1/2 Process & Thread 🚀 Process: 컴퓨터에서 실행중인 하나의 프로그램. 프로그램은 특정 작업을 수행하기 위한 명령어의 집합. 각 프로세스마다 RAM의 독립된 메모리 영역(코드, 데이터, 힙, 스택)을 할당 받는다. 따라서 다른 프로세스의 메모리 영역에 존재할 수 없다(위 프로세스 A 연두색 메모리와 프로세스 B 노란색 메모리가 별도로 존재한다) 🚀 그리고 각 프로세스마다 PCB(프로세스 제어 블록)이 만들어진다. PCB는 RAM 내에서 커널 메모리 영역에 별도 관리되며, kernel mode에서만 접근 가능하다(앞의 포스팅에서 kernel mode와 user mode에 대해서 배웠다. user mode일 때는 프로세스 메모리까지 접근 가능하지만, 실제 중요한 PCB는 접근이 불가능하다.. Computer Science/Basics 2024. 11. 1.
🧑🏻‍💻 LeetCode Medium Collections 2 - 20 Problems 0054. Spiral Matrix / 0739. Daily Temperaturesclass Solution: def spiralOrder(self, matrix: List[List[int]]) -> List[int]: e,s,w,n = [0,1], [1,0], [0,-1], [-1,0] output = [] rows, cols = len(matrix), len(matrix[0]) visited = [[False] * cols for _ in range(rows)] cnt = 0 x, y = 0,0 dirs = [e,s,w,n] dir_i = 0 while True: .. LeetCode Problems/Medium 2024. 10. 31.
💐 Operating Systems Fundamentals 1 intro🚀 운영체제(OS)란, 하드웨어 위에 설치되어 하드웨어(HW) 계층과 다른 소프트웨어(SW) 계층을 연결하는 SW 계층. 🚀① 컴퓨터 시스템의 자원 관리② 사용자가 컴퓨터를 사용할 수 있는 환경 제공: CPU, 메모리 같은 컴퓨터 자원은 제한적이므로 자원 관리는 매우 중요! 이를 OS가 담당③ 사용자 컴퓨터 간 인터페이스 제공 → 사용자가 컴퓨터를 편리하게 사용할 수 있는 환경 제공ex) 대표적인 OS: Windows, macOS, Linux, Unix 🚀 4가지 목적① 처리능력(throughput) 향상: 자원 관리를 통해 일정 시간 내에 시스템 처리량 향상② 반환시간(turnaround time) 단축: 사용자가 시스템에 요청한 작업 완료 시간 단축③ 사용 가능도(availability.. Computer Science/Basics 2024. 10. 30.
✈️ SQL Programmers Level 2 - 36 Solved 001. 3월에 태어난 여성 회원 목록 출력하기 / 002. 재구매가 일어난 상품과 회원 리스트 구하기SELECT MEMBER_ID, MEMBER_NAME, GENDER, DATE_FORMAT(DATE_OF_BIRTH, "%Y-%m-%d") AS DATE_OF_BIRTHFROM MEMBER_PROFILEWHERE TLNO IS NOT NULL AND MONTH(DATE_OF_BIRTH) = 3 AND GENDER = "W"ORDER BY MEMBER_IDSELECT USER_ID, PRODUCT_IDFROM ONLINE_SALEGROUP BY USER_ID, PRODUCT_IDHAVING COUNT(*) > 1ORDER BY USER_ID ASC, PRODUCT_ID DESC ✨(1) DATE_FORMA.. Database/SQL 2024. 10. 24.