Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- coding
- 오퍼레이팅시스템
- DP
- c++
- 컴공
- 너비우선탐색
- 코테
- OS
- 백준
- 개발
- Stack
- 코딩
- Operating System
- 브루트포스
- 북리뷰
- 컴공과
- 알고리즘
- 스택
- vector
- bfs
- 그래프
- 문제풀이
- 자료구조
- 컴퓨터공학과
- Computer science
- cs
- 정석학술정보관
- 오에스
- 정석
- 구현
Archives
- Today
- Total
목록프로젝트 오일러 (2)
Little Jay
[Python][Project Euler] 코딩퀴즈 5번 - 숫자 목록을 이용해 만든 두 자연수 합의 최솟값
사실 머리로 생각만 하면 간단한 문제인데 코드로 구현하려고 하니까 조금은 복잡한 문제였다. def solve(): A=[0, 0, 1, 8, 2, 2, 8, 9, 0, 3, 4, 0, 0] A.sort() i= A.count(0) if len(A) 2: count+=(A.pop()+A.pop())*i i*=10 count+=sum(A)*i return count
알고리즘/Project_Euler
2022. 8. 26. 12:22
[C++][Project Euler] 코딩퀴즈 3번 - Full HD 화면상의 직사각형들이 차지하고 있는 총면적
간단한 bfs문제. https://euler.synap.co.kr/quiz=3 입력받아야 하는 수가 좀 많아서 그렇지 bfs만 돌리면 간단하게 풀 수 있는 문제였다. #include #define endl '\n' using namespace std; const int dx[] = { 1, -1, 0, 0 }; const int dy[] = { 0, 0, 1, -1 }; int display[1920][1080]; bool visited[1920][1080]; int bfs(int x, int y) { visited[x][y] = true; queue q; q.push({ x, y }); int size = 1; while (!q.empty()) { auto cur = q.front(); q.pop();..
알고리즘/Project_Euler
2022. 8. 25. 14:58