일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Stack
- c++
- 오에스
- Operating System
- 컴공과
- 그래프
- cs
- 코딩
- vector
- 구현
- 컴퓨터공학과
- 알고리즘
- 개발
- 문제풀이
- Computer science
- 너비우선탐색
- 정석
- DP
- 자료구조
- 브루트포스
- 오퍼레이팅시스템
- 스택
- bfs
- OS
- 컴공
- 북리뷰
- 코테
- 백준
- coding
- 정석학술정보관
- Today
- Total
목록Algorithm (6)
Little Jay
ascii 코드를 이용해서 잘 변환시키는게 중요했던 문제 처음에 알파벳 변환은 'A'의 아스키 값인 65를 빼주면 되고, 숫자를 임시적으로 문자열로 저장했을 때, 이를 다시 숫자로 변환할때는 0의 아스키 값인 48을 빼주면 된다. #include #define endl '\n' using namespace std; int alphabet[] = { 3, 2, 1, 2, 3, 3, 2, 3, 3, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 1 }; string s1, s2; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cin >> s1; cin >> s2; string..
사실 이분 탐색으로 안풀었는데 맞았다..... 이건 맞았는데 13706번은 왜 틀린지 모르겠다 #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); long long n; cin >> n; long long temp = sqrt(n); if (pow(temp, 2) == n) cout
시간복잡도는 O(n) #include #include #include using namespace std; int main() { int testcase, x, y; vector vec; cin >> testcase; for (int i = 0; i > x >> y; vec.push_back(make_pair(x, y)); } sort(vec.begin(), vec.end()); for (int i = 0; i < testcase; i++) { cout
#include #include #include using namespace std; int main() { ios::sync_with_stdio(false); int testCase, a; cin >> testCase; vector list; for (int i = 0; i > a; list.push_back(a); } sort(list.begin(), list.end()); for (int i = 0; i < testCase; i++) { cout
간단한 입출력 문제 문제가 번역이 안되어 있어서 좀 그랬을 뿐! #include using namespace std; int main() { int num; cin >> num; int count = 0; if (num