목록전체 글 (370)
cgy12306
4 7414 1 14 7400 7410 위와 같은 경우에는 2가 나와야하지만 5가 나오는 경우를 조심해야 한다. // https://www.acmicpc.net/problem/11047 // 동전 0 #include #include #include using namespace std; vector coin; int N, K, res = 999999999, cnt = 0; int counting() { int sum = 0; int tmpK = 0; int coin_cnt = 0; tmpK = K; for (int i = coin.size() - 1; i >= 0; i--) { if (K == sum) break; if (tmpK < coin[i]) continue; else { cnt = tmpK / c..
// https://www.acmicpc.net/submit/15652 // N과 M (4) #include using namespace std; int N, M; int arr[9]; bool visited[9]; void dfs(int cnt, int num) { if (cnt == M) { for (int i = 0; i < M; i++) cout M; dfs(0, 1); }
// https://www.acmicpc.net/submit/15651 // N과 M (3) #include using namespace std; int N, M; int arr[9]; bool visited[9]; void dfs(int cnt) { if (cnt == M) { for (int i = 0; i < M; i++) cout M; dfs(0); } 백트랙킹
// https://www.acmicpc.net/problem/15650 // N과 M (2) #include using namespace std; int N, M; int arr[9]; bool visited[9]; void dfs(int cnt, int num) { if (cnt == M) { for (int i = 0; i < M; i++) cout M; dfs(0, 1); } 백트랙킹
// https://www.acmicpc.net/submit/15649 // N과 M (1) #include using namespace std; int N, M; int arr[9]; bool visited[9]; void dfs(int cnt) { if (cnt == M) { for (int i = 0; i < M; i++) cout M; dfs(0); } 백트래킹 참고 : https://cryptosalamander.tistory.com/54

역시 시험기간엔 시험공부보다 딴짓하는게 더 재밌는듯 합니다. 평소에도 롤과 롤토체스를 자주 플레이 합니다. 롤토체스를 하다 문득 디스코드 봇을 제작하고 싶어져서 롤토체스 티어 검색해주는 디스코드 봇을 간단하게 만들어 봤습니다. 시험기간 + 롤토체스 + 코딩 = 못참지 Riot API Riot API를 사용하기 위해서는 Riot Developer Portal에서 Riot API 키를 발급받을 수 있습니다. https://developer.riotgames.com/ Riot Developer Portal About the Riot Games API With this site we hope to provide the League of Legends developer community with access to..
// https://www.acmicpc.net/problem/11399 // ATM #include #include #include using namespace std; vector V; int main() { int N; cin >> N; for (int i = 0; i > num; V.push_back(num); } sort(V.begin(), V.end()); int ans = 0, sum = 0; for (auto v : V) { sum += v; ans += sum; } cout
// https://www.acmicpc.net/problem/1920 // 수 찾기 #include #include #include using namespace std; vector V; int N, M, num; bool search(int num) { int left = 0; int right = V.size() - 1; while (left V[mid]) left = mid + 1; else return true; } return false; } int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> N; for (int i = 0; i > num; V.push_back(num);..
#include #include #include using namespace std; int arr[1000001]; stack s1; stack s2; stack ms; void clear() { while (!s1.empty()) s1.pop(); while (!s2.empty()) { s1.push(s2.top()); s2.pop(); } } int empty_check() { int Max = 0; if (!ms.empty())Max = ms.top(); while(!ms.empty()) ms.pop(); return Max; } int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N; cin >> N; for ..
// https://www.acmicpc.net/problem/9020 // 골드바흐의 추측 #include #include #include using namespace std; bool arr[10001]; bool is_prime(int num) { for (int i = 2; i*i > N; for (int i = 2; i > num; left = right = num / 2; while (left >= 0) { if (arr[left] && arr[right]) { if (left + right == ..