c++

· Algorithm
유형 난이도 완료일 링크 특이사항 백트래킹 실버3 23/03/31 https://www.acmicpc.net/problem/15657 내 코드 #include #include #include using namespace std; int arr[8]; int n, m; int visited[8]; vector box; void DFS(int idx, int depth) { if(depth == m) { for(int i=0;i
· Algorithm
유형 난이도 완료일 링크 특이사항 백트래킹 실버3 23/03/30 https://www.acmicpc.net/problem/15654 내 코드 #include #include #include using namespace std; int arr[8]; int n, m; int visited[8]; vector box; void DFS(int idx, int depth) { if(depth == m) { for(int i=0;i
· Algorithm
유형 난이도 완료일 링크 특이사항 DP 실버3 23/03/30 https://www.acmicpc.net/problem/2407 틀린 코드 #include #include using namespace std; string arr[101][101]; int main(void) { int n, m; cin >> n >> m; for(int i=1;i> m; for(int i=1;i
· Algorithm
유형 난이도 완료일 링크 특이사항 문자열 실버1 23/03/29 https://www.acmicpc.net/problem/5525 서브태스크 50점 코드 #include #include using namespace std; bool check = true; int cnt = 0; int main(void) { int n, m; cin >> n >> m ; string ioi; cin >> ioi; for(int i = 0; i > m ; cin >> ioi; container.emplace_back(0); if(ioi[1]=='O' && ioi[0]=='I' && ioi[2]=='I') { container[cnt]++; check[1] = 1; } for(int i=2; i n >> m; string ..
· Algorithm
유형 난이도 완료일 링크 특이사항 DFS, BFS 실버2 23/03/28 https://www.acmicpc.net/problem/1260 내 코드 #include #include #include using namespace std; int arr[1001][1001]; int visited[1001]; int visited2[1001]; int n, m, v; int cnt = 0; int cnt2 = 1; void DFS(int start) { cnt++; if(cnt>n) return; cout v1 >> v2; arr[v1][v2]=1; arr[v2][v1]=1; } visited[v]=1; DFS(v); cout
· Algorithm
유형 난이도 완료일 링크 특이사항 DP 실버3 23/03/26 https://www.acmicpc.net/problem/11727 내 코드 #include #include using namespace std; int main(void) { int n; cin >> n; int arr[1001] = {}; arr[1] = 1; arr[2] = 3; for(int i= 3; i
· Algorithm
유형 난이도 완료일 링크 특이사항 DP 실버3 23/03/26 https://www.acmicpc.net/problem/11726 내 코드 #include #include using namespace std; int main(void) { int n; cin >> n; int arr[1001] = {}; arr[1] = 1; arr[2] = 2; for(int i= 3; i
· Algorithm
유형 난이도 완료일 링크 특이사항 DP 실버3 23/03/26 https://www.acmicpc.net/problem/11659 내 코드 #include #include using namespace std; int dp[100001]; int main(void) { ios::sync_with_stdio(false); cin.tie(NULL); int n, m; cin >> n >> m ; int arr[100001] = {}; for(int i=1;i> arr[i]; } dp[1] = arr[1]; for(int i=2; i a >> b; if(a == 1) { cout
Yannoo
'c++' 태그의 글 목록 (2 Page)