Devlog
[백준 1343] 폴리오미노
스터디/알고리즘 2022. 3. 17. 23:08

#include #include using namespace std; int main(){ int count = 0; string str; cin>>str; for(int i=0; i

[백준 10866] 덱
스터디/알고리즘 2022. 2. 11. 02:08

#include #include using namespace std; int main(){ dequedq; int n; cin >> n; for(int i=0; i> cmd; if(cmd == "push_front"){ int x; cin >> x; dq.push_front(x); } else if(cmd == "push_back"){ int x; cin >> x; dq.push_back(x); } else if(cmd == "pop_front"){ if(dq.empty()) cout

[백준 2231] 분해합
스터디/알고리즘 2022. 2. 11. 01:30

#include #include using namespace std; int main(){ int n, sum, digit; cin >> n; for(int i=1; i

[백준 19532] 수학은 비대면강의입니다
스터디/알고리즘 2022. 2. 11. 01:26

#include #include using namespace std; int main() { vector N(6); for(int i = 0; i> N[i]; for(int x = -1000; x

[백준 1713] 후보 추천하기
스터디/알고리즘 2022. 1. 18. 23:34

#include #include #include using namespace std; #define MAX 101 int n, m; int recommend[MAX]; int main(){ cin >> n >> m; vector students(n); for (int i = 0; i > pick; recommend[pick]++; bool check = true; for (int j = 0; j < n; j++){ if (students[j].second == 0){ students[j].second = pick; students[j].first = i; check = false; break; } else if (students[j].second == pic..

[백준 5597] 과제 안 내신 분...?
스터디/알고리즘 2022. 1. 13. 18:36

#include #include using namespace std; int main(){ int students[31]={0}; int n; for(int i=1; i> n; students[n]=1; } for(int i=1; i

[백준 5212] 지구 온난화
스터디/알고리즘 2022. 1. 13. 18:32

처음 시도한 풀이: 실패 #include #define MAX 10 using namespace std; int main(){ int R, C; cin >> R >> C; char map[MAX][MAX]={0}; char update_map[MAX][MAX]={0}; for(int i=1; i map[i][j]; } } int count = 0; for(int i=1; i

[백준 2164] 카드2
스터디/알고리즘 2022. 1. 10. 22:32

#include #include using namespace std; int main(){ int n; queueq; cin >> n; for(int i=1; i 1){ q.pop(); q.push(q.front()); q.pop(); } cout

검색 태그