[알고리즘] 백준 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
[알고리즘] 백준 2783 - 삼각 김밥 (C++) [문제 링크] : https://www.acmicpc.net/problem/2783#include using namespace std;int main(){ double A, B, N, Ans; cin >> A >> B >> N; Ans = A / B; for(int i=0; i> A >> B; if(Ans > A / B){ Ans = A / B; } } cout 알고리즘 2024.11.09
[알고리즘] 백준 10829 - 이진수 변환 (C++) [문제 링크] : https://www.acmicpc.net/problem/10829#include using namespace std;void solve(long long n){ if(n == 0 || n == 1){ cout > N; solve(N); cout 알고리즘 2024.11.08
[알고리즘] 백준 10179 - 쿠폰 (C++) [문제 링크] : https://www.acmicpc.net/problem/10179#include using namespace std;int main(){ int N; double P; cin >> N; for(int i=0; i> P; cout 알고리즘 2024.11.07
[알고리즘] 백준 5523 - 경기 결과 (C++) [문제 링크] : https://www.acmicpc.net/problem/5523#include using namespace std;int main(){ int N; int a = 0, b = 0, t, s; cin >> N; for(int i=0; i> t >> s; if(t s){ a++; } } cout 알고리즘 2024.11.06