전체 글

#include #include #include using namespace std; int main(){ int T; scanf("%d", &T); for(int i = 0; i > x >> y; long long move, max = 0; while(max * max
#include #include #include #include using namespace std; int dp[31][31]; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); for (int i = 1; i t; while (t--) { int n, m; cin >> n >> m; cout
DFS 는 stack 또는 recursive 함수를 사용하여 푼다. BFS 는 queue를 사용하여 푼다. #include #include #include #include #include #include using namespace std; // dfs에 들어오면 '방문'한 것으로 판단 // 해당 위치에 check true 로 해준다. void dfs(int start, vector graph[], bool check[]){ stack s; s.push(start); check[start] = true; printf("%d ", start); while(!s.empty()){ int current_node = s.top(); s.pop(); for(int i = 0; i < graph[current_no..
* Now that~ : 이제~ * be supposed to~ : 하기로 했어 * be not supposed to~ : 하면 안되 Now that I'm 31 years old, I need to prepare for marriage. Now that I'll graduate next Friday, I should finish writing the paper. Of course, I know that I should write the paper and I try to get a mindset to me that "Hey, you should write the paper right away." But I am studying algorithms and other things because of gett..
오뚜깅
오뚜깅