[알고리즘] 백준 8545 - Zadanie próbne (C++) [문제 링크] : https://www.acmicpc.net/problem/8545#include #include using namespace std;int main(){ string S; cin >> S; reverse(S.begin(), S.end()); cout 알고리즘 2024.09.30
[알고리즘] 백준 10801 - 카드게임 (C++) [문제 링크] : https://www.acmicpc.net/problem/10801#include using namespace std;int A[11], B[11];int main(){ int a = 0, b = 0; for(int i=0; i> A[i]; } for(int i=0; i> B[i]; } for(int i=0; i B[i]){ a++; } else if(A[i] b){ cout a){ cout 알고리즘 2024.09.29
[알고리즘] 백준 6840 - Who is in the middle? (C++) [문제 링크] : https://www.acmicpc.net/problem/6840#include #include using namespace std;int Arr[3];int main(){ cin >> Arr[0] >> Arr[1] >> Arr[2]; sort(Arr, Arr+3); cout 알고리즘 2024.09.28
[알고리즘] 백준 10822 - 더하기 (C++) [문제 링크] : https://www.acmicpc.net/problem/10822#include using namespace std;int main(){ string S, T; int sum = 0; cin >> S; for(int i=0; i 알고리즘 2024.09.27
[알고리즘] 백준 21598 - SciComLove (C++) [문제 링크] : https://www.acmicpc.net/problem/21598#include using namespace std;int main(){ long long N; cin >> N; for(long long i=0; i 알고리즘 2024.09.26
[알고리즘] 백준 2511 - 카드놀이 (C++) [문제 링크] : https://www.acmicpc.net/problem/2511#include using namespace std; int A[10], B[10];int cntA = 0, cntB = 0;char C = 'D'; int main(){ for(int i=0; i> A[i]; } for(int i=0; i> B[i]; } for(int i=0; i B[i]){ cntA += 3; C = 'A'; } else if(A[i] cntB){ cout 알고리즘 2024.09.25
[알고리즘] 백준 18096 - Арифметическая магия (C++) [문제 링크] : https://www.acmicpc.net/problem/18096#include using namespace std;int main(){ cout 알고리즘 2024.09.24
[알고리즘] 백준 15000 - CAPS (C++) [문제 링크] : https://www.acmicpc.net/problem/15000#include #include using namespace std;int main(){ string S; cin >> S; transform(S.begin(), S.end(), S.begin(), ::toupper); cout 알고리즘 2024.09.23
[알고리즘] 백준 21300 - Bottle Return (C++) [문제 링크] : https://www.acmicpc.net/problem/21300#include using namespace std;int main(){ int Ans = 0, inp; for(int i=0; i> inp; Ans += inp; } cout 알고리즘 2024.09.22
[알고리즘] 백준 11170 - 0의 개수 (C++) [문제 링크] : https://www.acmicpc.net/problem/11170#include using namespace std; int main(){ int T, A, B; cin >> T; while(T--){ cin >> A >> B; int cnt=0; for(int i=A; i 알고리즘 2024.09.21