[알고리즘] 백준 11282 - 한글 (C++) [문제 링크] : https://www.acmicpc.net/problem/11282#include using namespace std;int main(){ int N; string S; cin >> N; N += 3071; S.push_back(N / 4096 + 234); S.push_back(N / 64 % 64 + 128); S.push_back(N % 64 + 128); cout 알고리즘 2024.11.19
[알고리즘] 백준 10409 - 서버 (C++) [문제 링크] : https://www.acmicpc.net/problem/10409#include using namespace std;int N, M, Ans;int Arr[51];int main(){ cin >> N >> M; int sum = 0; for(int i=0; i> Arr[i]; sum += Arr[i]; if(sum 알고리즘 2024.11.18
[알고리즘] 백준 11816 - 8진수, 10진수, 16진수 (C++) [문제 링크] : https://www.acmicpc.net/problem/11816#include using namespace std;int main(){ string N; cin >> N; if(N.length() > 1){ if(N.substr(0, 2) == "0x"){ cout 알고리즘 2024.11.17
[알고리즘] 백준 14656 - 조교는 새디스트야!! (C++) [문제 링크] : https://www.acmicpc.net/problem/14656#include using namespace std;int N, Ans, inp;int main(){ cin >> N; for(int i=1; i> inp; if(inp != i){ Ans++; } } cout 알고리즘 2024.11.16
[알고리즘] 백준 24736 - Football Scoring (C++) [문제 링크] : https://www.acmicpc.net/problem/24736#include using namespace std;int Cnt[2], Arr[5];int main(){ for(int i=0; i> Arr[j]; } Cnt[i] = Arr[0] * 6 + Arr[1] * 3 + Arr[2] * 2 + Arr[3] + Arr[4] * 2; } for(int i=0; i 알고리즘 2024.11.15
[알고리즘] 백준 28701 - 세제곱의 합 (C++) [문제 링크] : https://www.acmicpc.net/problem/28701#include #include using namespace std;int main(){ int N; cin >> N; int sum = N * (N + 1) / 2; int S = sum * sum; int Cnt = 0; for(int i=1; i 알고리즘 2024.11.14
[알고리즘] 백준 10163 - 색종이 (C++) #include#includeusing namespace std;int Arr[1001][1001];int main(){ int N, X, Y, W, H; cin >> N; for(int i=1; i> X >> Y >> W >> H; for (int j=X; j[문제 링크] : https://www.acmicpc.net/problem/10163 알고리즘 2024.11.13
[알고리즘] 백준 6778 - Which Alien? (C++) [문제 링크] : https://www.acmicpc.net/problem/6778#include using namespace std;int main(){ int A, B; cin >> A >> B; if(A >= 3 && B = 2){ cout 알고리즘 2024.11.12
[알고리즘] 백준 9933 - 민균이의 비밀번호 (C++) [문제 링크] : https://www.acmicpc.net/problem/9933#include #include #include using namespace std;int N;string S;unordered_map M;int main(){ cin >> N; for(int i=0; i> S; if(M[S] == 0){ M[S]++; } else{ cout 알고리즘 2024.11.11
[알고리즘] 백준 25377 - 빵 (C++) [문제 링크] : https://www.acmicpc.net/problem/25377#include using namespace std;int T, A, B, Ans = 1234567890;int main(){ cin >> T; while(T--){ cin >> A >> B; if(A 알고리즘 2024.11.10