[알고리즘] 백준 5357 - Dedupe (C++) [문제 링크] : https://www.acmicpc.net/problem/5357#include using namespace std;int main(){ int N; string S; cin >> N; while(N--){ cin >> S; char tmp = ' '; for(int i=0; i 알고리즘 2025.06.10
[알고리즘] 백준 2160 - 그림 비교 (C++) [문제 링크] : https://www.acmicpc.net/problem/2160#include #include using namespace std;int N;vector> V;int Arr[2];int Min = 0x7f7f7f7f;int solve(vector a, vector b){ int cnt = 0; for(int i=0; i> N; for(int _=0; _ s; for(int i=0; i> tmp; s.push_back(tmp); } V.push_back(s); } for(int i=0; i v = V[i]; for(int j=i+1; j vv = V[j]; int diff.. 알고리즘 2025.06.09
[알고리즘] 백준 25591 - 푸앙이와 종윤이 (C++) [문제 링크] : https://www.acmicpc.net/problem/25591#include using namespace std;int N, M;int main(){ cin >> N >> M; int A = 100 - N; int B = 100 - M; int C = 100 - (A + B); int D = A * B; int E = D / 100; int F = D % 100; cout 알고리즘 2025.06.08
[알고리즘] 백준 18408 - 3 つの整数 (Three Integers) (C++) [문제 링크] : https://www.acmicpc.net/problem/18408#include using namespace std;int Arr[3];int main(){ int inp, cnt; for(int i=0; i> inp; Arr[inp]++; } for(int i=0; i 알고리즘 2025.06.07
[알고리즘] 백준 30017 - 치즈버거 만들기 (C++) [문제 링크] : https://www.acmicpc.net/problem/30017#include using namespace std;int main(){ int A, B, tmp, Ans = 3; cin >> A >> B; A -= 2; B -= 1; tmp = min(A, B); Ans += (tmp * 2); cout 알고리즘 2025.06.06
[알고리즘] 백준 13420 - 사칙연산 (C++) [문제 링크] : https://www.acmicpc.net/problem/13420#include using namespace std;int main(){ int T; cin >> T; for(int i=0; i> a >> c >> b >> s >> res; if(c == '+'){ if(a + b == res){ cout 알고리즘 2025.06.05
[알고리즘] 백준 31429 - SUAPC 2023 Summer (C++) [문제 링크] : https://www.acmicpc.net/problem/31429#include using namespace std;int N;int Arr[11] = {12, 11, 11, 10, 9, 9, 9, 8, 7, 6, 6};int tmp[11] = {1600, 894, 1327, 1311, 1004, 1178, 1357, 837, 1055, 556, 773};int main(){ cin >> N; cout 알고리즘 2025.06.04
[알고리즘] 백준 17249 - 태보태보 총난타 (C++) [문제 링크] : https://www.acmicpc.net/problem/17249#include using namespace std;int main(){ string S; int s = 0, e = 0, t = 0; cin >> S; for(int i=0; i 알고리즘 2025.06.03
[알고리즘] 백준 20944 - 팰린드롬 척화비 (C++) [문제 링크] : https://www.acmicpc.net/problem/20944#include using namespace std;int main(){ int N; cin >> N; for(int i=0; i 알고리즘 2025.06.02
[알고리즘] 백준 12833 - XORXORXOR (C++) [문제 링크] : https://www.acmicpc.net/problem/12833#include using namespace std;int A, B, C, Ans;int main(){ cin >> A >> B >> C; if(C % 2 != 0){ Ans = A ^ B; } else{ Ans = A; } cout 알고리즘 2025.06.01