250x250
Notice
Recent Posts
Recent Comments
Link
반응형
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- dfs
- spring boot
- union_find
- scanner
- JPA
- List
- Union-find
- 스택
- string
- sql
- math
- alter
- Calendar
- 힙덤프
- map
- deque
- CSS
- set
- 리소스모니터링
- GC로그수집
- BFS
- priority_queue
- html
- 스프링부트
- date
- Properties
- NIO
- 큐
- Java
- javascript
Archives
- Today
- Total
목록백준9012번 (1)
매일 조금씩

스택을 활용한 문제다. 라인 코테를 보기전에 스택을 공부했다면... 이문제를 풀었다면.... 얼마나 좋았을까... YES가 나와야 하는데 NO만 나오는 오류가 발생했다. 문제는 stack s; 를 for문 밖에 선언해서 그런거였다. 한줄 한줄 새로운 괄호의 testcase를 받을때마다 새로운 stack을 사용해야하므로 for문 안에 선언 해주어야한다. #include #include #include using namespace std; int n; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0);//cin 실행속도 향상 cin >> n; for (int i = 0; i > str; ..
알고리즘
2020. 4. 5. 18:15