[알고리즘] 백준 2954 - 창영이의 일기장 (C++) [문제 링크] : https://www.acmicpc.net/problem/2954#include #include using namespace std;int main(){ string S; getline(cin, S); for(int i=0; i 알고리즘 2025.03.11
[알고리즘] 백준 27328 - 三方比較 (Three-Way Comparison) (C++) [문제 링크] : https://www.acmicpc.net/problem/27328#include using namespace std;int main(){ int A, B; cin >> A >> B; if(A B){ cout 알고리즘 2025.03.09
[알고리즘] 백준 2547 - 사탕 선생 고창영 (C++) [문제 링크] : https://www.acmicpc.net/problem/2547#include using namespace std;int T;int main(){ long long N, Cnt, inp; cin >> T; while(T--){ Cnt = 0; cin >> N; for(int i=0; i> inp; Cnt = (Cnt + inp) % N; } if(Cnt % N != 0){ cout 알고리즘 2025.03.08
[알고리즘] 백준 26766 - Serca (C++) [문제 링크] : https://www.acmicpc.net/problem/26766#include using namespace std;int N;int main(){ cin >> N; while(N--){ cout 알고리즘 2025.03.07
[알고리즘] 백준 15781 - 헬멧과 조끼 (C++) [문제 링크] : https://www.acmicpc.net/problem/15781#include #include using namespace std;int main(){ int N, M, A = 0, B = 0, inp; cin >> N >> M; for(int i=0; i> inp; A = max(A, inp); } for(int i=0; i> inp; B = max(B, inp); } cout 알고리즘 2025.03.06
[알고리즘] 백준 28431 - 양말 짝 맞추기 (C++) [문제 링크] : https://www.acmicpc.net/problem/28431#include using namespace std;int Arr[10];int main(){ int inp; for(int i=0; i> inp; Arr[inp]++; } for(int i=0; i 알고리즘 2025.03.05
[알고리즘] 백준 19602 - Dog Treats (C++) [문제 링크] : https://www.acmicpc.net/problem/19602#include using namespace std;int A, B, C, Ans;int main(){ cin >> A >> B >> C; Ans = 1 * A + 2 * B + 3 * C; if(Ans >= 10){ cout 알고리즘 2025.03.04
[알고리즘] 백준 15059 - Hard choice (C++) [문제 링크] : https://www.acmicpc.net/problem/15059#include using namespace std;int A[3], B[3], Ans;int main(){ for(int i=0; i> A[i]; } for(int i=0; i> B[i]; } for(int i=0; i 알고리즘 2025.03.03
[알고리즘] 백준 26489 - Gum Gum for Jay Jay (C++) [문제 링크] : https://www.acmicpc.net/problem/26489#include using namespace std;int main(){ string S; int Cnt = 0; while(getline(cin, S)){ Cnt++; } cout 알고리즘 2025.03.02
[알고리즘] 백준 27324 - ゾロ目 (Same Numbers) (C++) [문제 링크] : https://www.acmicpc.net/problem/27324#include using namespace std;char a, b;int main() { cin >> a >> b; if(a == b){ cout 알고리즘 2025.03.01