목록2024/11/28 (1)
지우너
[BOJ] 3040. 백설공주와 일곱 난쟁이 C++
문제https://www.acmicpc.net/problem/3040 코드#include #include using namespace std;vector dwarf(9);vector picked;bool isAnswer(){ int sum=0; for(auto e:picked){ sum+=e; } if(sum==100) return true; else return false;}void dfs(int curr_idx){ if(curr_idx+1>9 || picked.size()>=7){ if(picked.size()==7 && isAnswer()){ for(auto e:picked){ cout > dwa..
Problem Solving
2024. 11. 28. 10:55