백준

· Algorithm
유형 난이도 완료일 링크 특이사항 정수론 실버5 23/03/19 https://www.acmicpc.net/problem/13241 내 코드 #include #include using namespace std; int main(void) { long long int a, b; cin >> a >> b; long long int x = max(a,b); long long int y = min(a,b); long long int temp; long long int k; while(true) { temp = x%y; if(temp == 0) { k = y; break; } else { x = y; y = temp; } // cout
· Algorithm
유형 난이도 완료일 링크 특이사항 문자열 브론즈1 23/03/16 https://www.acmicpc.net/problem/10798 내 코드 #include #include using namespace std; int main(void) { char arr[5][15] = {0,}; for(int i=0; i
· Algorithm
유형 난이도 완료일 링크 특이사항 DP/냅색 골드5 23/03/15 https://www.acmicpc.net/problem/2293 틀린 코드 #include #include using namespace std; int dp[10001][101]; int coin[100]; int Recursion(int K, int idx) { if(idx == 0) { if(K%coin[0]==0) { //cout
· Algorithm
유형 난이도 완료일 링크 특이사항 그리디 실버4 23/03/15 https://www.acmicpc.net/problem/11047 내 코드 #include #include using namespace std; int coin[10]; int main(void) { int n,k; cin >> n >> k; for(int i=0; i> coin[i]; } int remnant = k; int used = 0; for(int i=n-1; i>=0; i--) { if(remnant==0) { cout
· Algorithm
유형 난이도 완료일 링크 특이사항 문자열 실버5 23/03/15 https://www.acmicpc.net/problem/25206 내 코드 #include #include #include using namespace std; int main(void) { string name; float point; string grade; float point_sum = 0; float grade_sum = 0; for(int i=0;i> name >> point >> grade; if(grade[0]-64 == 6) //F point_sum += point; else if(grade[0]-64 == 16) //P continue; else { point_sum += point; float temp; temp = (..
· Algorithm
유형 난이도 완료일 링크 특이사항 배열 브론즈2 23/03/13 https://www.acmicpc.net/problem/10812 내 코드 #include using namespace std; int arr[101]; int main(int argc, char* argv[]) { int n, m; cin >> n >> m; for(int i=1; i a >> b >> c; int temp1[100]={}; for(int j =0; j end >> mid; rotate(arr+be..
· Algorithm
유형 난이도 완료일 링크 특이사항 DP 실버2 23/03/12 https://www.acmicpc.net/problem/1535 내 코드 #include #include using namespace std; int dp[21][101]; int joy[21]; int health[21]; int main(void) { int n; cin >> n; for(int i=1; i> health[i]; for(int i=1; i> joy[i]; for(int i= 1; i
· Algorithm
유형 난이도 완료일 링크 특이사항 DP/냅색 G5 23/03/11 https://www.acmicpc.net/problem/12865 오래 걸림, 냅색 알고리즘 참조 정답 코드 #include #include using namespace std; int bestValue[101][100001]; int value[101]; int weight[101]; int main(void) { int n, k; cin >> n >> k; for(int i =1; i> weight[i] >> value[i]; for(int i=1; i N >> K; for (int i = 1; i > w[i] >> v[i]; } for (int i = 1; i = 1; j--) { if (w[i]
Yannoo
'백준' 태그의 글 목록 (4 Page)