전체 글 (224) 썸네일형 리스트형 백준 22943 수 (C++) https://www.acmicpc.net/problem/22943#include #include #include using namespace std;vector prime;int ans = 0;bool visit[10];int k, m;void solve(int cnt, int num) { if (cnt == k) { int s = 0; int e = prime.size() - 1; bool isSum = false;// 서로 다른 두 개의 소수의 합으로 나타낼 수 있는 경우 while (s > k >> m; for (int i = 2; i 1. 문제k와 m이 주어진다. 서로 다른 숫자로 이루어진 k 자리의 수 중 다음 조건을 만.. Redis 기초 1. 개요이전 포스트에서 Redis에 대해 간단히 알아보았다. 간단히 요약해보자면 다음과 같다.key-value 형태로 데이터를 저장하는 NoSQL주로 토큰 관리나 캐싱 등의 보조 저장소로 사용이번에는 Redis의 기초 사용법에 대해 알아보자.2. 설치bash에 다음을 입력해주면 redis를 설치할 수 있다.sudo apt install redis-server설치가 완료되면 redis 서버가 백그라운드에서 동작하게 된다. 이제 다음의 명령어로 redis 서버를 켜고 끌 수 있다.sudo systemctl start redis-serversudo systemctl stop redis-serversudo systemctl restart redis-server 3. 다양한 타입redis는 다양한 타입의 데이터.. 백준 14719 빗물 (C++) https://www.acmicpc.net/problem/14719#include #include using namespace std;vector blk;int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int h, w; int ans = 0; cin >> h >> w; blk.resize(w); for (int i = 0; i > blk[i]; } for (int i = 1; i =i: 블럭 공간 for (int j = 0; j = i) { ans += j - s - 1; isStart = false; .. 백준 20207 달력 (C++) https://www.acmicpc.net/problem/20207#include #include #include using namespace std;vector> arr;bool comp(pair a, pair b){ if (a.first != b.first) { return a.first b.second - b.first; }}int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; int ans = 0; cin >> n; arr.resize(n); for (int i = 0; i > arr[i].first >> arr[i].second; } .. Hello, Redis 1. 개요다음 코드는 구구모 프로젝트에서 팀원 분이 구현한 메일 전송 코드의 일부를 발췌한 것이다. //mail을 어디서 보내는지, 어디로 보내는지 , 인증 번호를 html 형식으로 어떻게 보내는지 작성합니다. public String joinEmail(String email) { makeRandomNumber(); String setFrom = //송신 이메일 String title = "gugumo 회원가입 인증번호"; // 이메일 제목 String content = "나의 APP을 방문해주셔서 감사합니다." + //html 형식으로 작성 ! "" + .. 백준 20164 홀수 홀릭 호석 (C++) https://www.acmicpc.net/problem/20164#include #include #define INF 987654321using namespace std;int m = INF, M = 0;void solve(string n, int total){ //홀수의 개수 더하기 for (int i = 0; i = 3) { for (int i = 1; i > s; solve(s, 0); cout 1. 문제1 ≤ N ≤ 10^9-1인 자연수 N이 주어진다. 이를 가지고 다음의 연산을 진행한다고 하자.수의 각 자리 숫자 중에서 홀수의 개수를 종이에 적는다.수가 한 자리이면 더 이상 아무것도 하지 못하고 종료한다.수가 두 자리이면 2개로 나눠서 합을 구하여 새로운 수로.. 백준 13019 A를 B로 (C++) https://www.acmicpc.net/problem/13019#include #include using namespace std;int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s; string e; cin >> s; cin >> e; vector scnt(26, 0); vector ecnt(26, 0); for (int i = 0; i = 0; i--) { if (s[i] == e[eidx]) { eidx--; } else ans++; } cout 1. 문제두 문자열 a, b가 주어진다. a를 b.. 백준 13975 파일 합치기 3 (C++) https://www.acmicpc.net/problem/13975#include #include #include #define ll long longusing namespace std;int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ll t; cin >> t; for (int test = 0; test > n; priority_queue, greater> pq; for (int i = 0; i > temp; pq.push(temp); } while (pq.size() != 1) { ll temp1 = .. 이전 1 ··· 12 13 14 15 16 17 18 ··· 28 다음