백준51 백준 11899 괄호 끼워넣기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 #include #include #include #include using namespace std; int main() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); stack st; string s; cin >> s; for (int i = 0; i 2023. 2. 9. 백준 17608번 막대기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 #include #include #include #include using namespace std; int main() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); int n; stack st; cin >> n; while (n--) { int a; cin>> a; st.push(a); } int count =1; int top = st.top(); while (!st.empty()) { if (top 2023. 2. 9. 백준 1316 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 #include #include #include using namespace std; int main() { int input; cin >> input; bool check =1; int count = 0; int szie = 0; string name; for (int i = 0; i > name; szie = name.length(); if (szie == 1) { count++; continue; } for (int i = 0; i 2023. 1. 20. 이전 1 ··· 6 7 8 9 다음