본문 바로가기

반응형

Algorithm_BOJ(백준)/구현

(35)
[백준 14891 c++ O] 톱니바퀴 - 풀이 링크: https://github.com/xhaktmchl/Algorithm_study/blob/main/BOJ/%EA%B5%AC%ED%98%84/%5B%EB%B0%B1%EC%A4%80%2014891%20c%2B%2B%20O%5D%20%ED%86%B1%EB%8B%88%EB%B0%94%ED%80%B4.cpp GitHub - xhaktmchl/Algorithm_study: 알고리즘 이론 및 문제풀이 알고리즘 이론 및 문제풀이. Contribute to xhaktmchl/Algorithm_study development by creating an account on GitHub. github.com #include #include // fill_n, min,max, swap //#include // ..
[백준 14503 c++ O] 로봇 청소기 - 풀이 링크: https://github.com/xhaktmchl/Algorithm_study/blob/main/BOJ/%EA%B5%AC%ED%98%84/%5B%EB%B0%B1%EC%A4%80%2014503%20c%2B%2B%20O%5D%20%EB%A1%9C%EB%B4%87%20%EC%B2%AD%EC%86%8C%EA%B8%B0.cpp GitHub - xhaktmchl/Algorithm_study: 알고리즘 이론 및 문제풀이 알고리즘 이론 및 문제풀이. Contribute to xhaktmchl/Algorithm_study development by creating an account on GitHub. github.com #include #include // fill_n, min,max, swap //..
[백준 1977 c++ OO] 완전제곱수 12345678910111213141516171819202122232425262728293031323334353637#define _CRT_SECURE_NO_WARNINGS#include #include #include #include using namespace std;/*[백준 1977 c++ OO] 완전제곱수문제:접근: 제곱수는 sqrt 보다 i*i 로 계산하는 습관을 들이자!시간복잡도:풀이:*/#define MAX int m, n, sum = 0,minN=10001; int main() { ios::sync_with_stdio(false); // 계산시간 단축 // cin,scanf 같이 쓰면 오류 cin.tie(nullptr); cout.tie(nullptr);// 입출력 시간 단축 // 이것을..
[백준 9076 c++ O] 점수 집계 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 31 32 #define _CRT_SECURE_NO_WARNINGS #include #include #include #include // memset 헤더 #include using namespace std; // [백준 9076 c++ O] 점수 집계 // 문제: // 접근: // 시간복잡도: O(t*n) = 10*5 = 50 // 풀이 : int t; int main() { ios::sync_with_stdio(false); // 계산시간 단축 // cin,scanf 같이 쓰면 오류 cin.tie(nullptr); cout.tie(nullptr);// 입출력..
[백준 5176 c++ O] 대회 자리 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 31 32 33 34 35 36 37 #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include // memset 헤더 using namespace std; // [백준 5176 c++ O] 대회 자리 // 문제: // 접근1: // 시간복잡도: // 풀이: #define MAX 501 int t, n, m; bool cnt[MAX]; int main() { ios::sync_with_stdio(false); // 계산시간 단축 // cin,scanf 같이 쓰면 오류 cin.tie(n..
[백준 2460 c++ O] 지능형 기차 2 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 #define _CRT_SECURE_NO_WARNINGS #include #include #include #include // memset 헤더 #include using namespace std; // [백준 2460 c++ O] 지능형 기차 2 // 문제: // 접근: 기본 구현 // 시간복잡도: // 풀이: int sum = 0; int a, b, maxN = 0; int main() { ios::sync_with_stdio(false); // 계산시간 단축 // cin,scanf 같이 쓰면 오류 cin.tie(nullptr); cout.tie(nullptr);..
[백준 5597 c++ O] 과제 안 내신 분..? 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 #define _CRT_SECURE_NO_WARNINGS #include #include #include #include // memset 헤더 using namespace std; // [백준 5597 c++ O] 과제 안 내신 분..? // 문제: // 접근: // 풀이: #define MAX 31 bool ch[MAX]; int n; int main() { ios::sync_with_stdio(false); // 계산시간 단축 // cin,scanf 같이 쓰면 오류 cin.tie(nullptr); cout.tie(nullptr);// 입출력 시간 단축 // 이것을 쓰면 scan..
[백준 2953 c++ O] 나는 요리사다 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 #define _CRT_SECURE_NO_WARNINGS #include #include #include #include // memset 헤더 #include using namespace std; // [백준 2953 c++ O] 나는 요리사다 // 문제: // 접근: // 풀이: int maxidx=0,maxN=0; int main() { ios::sync_with_stdio(false); // 계산시간 단축 // cin,scanf 같이 쓰면 오류 cin.tie(nullptr); cout.tie(nullptr);// 입출력 시간 단축 // 이것을 쓰면 scanf,..

반응형