Pascal 29713 브실이의 띠부띠부씰 컬렉션 (백준)
var a : array[1..90] of integer; i, j, n : Integer; c : char; b : array[1..12] of Char; begin b := 'BRONZESILVER'; readln(n); for i:=1 to n do begin read(c); a[byte(c)] := a[byte(c)] + 1; end; i:=1001; a[byte('E')] := a[byte('E')] div 2; a[byte('R')] := a[byte('R')] div 2; n := 12; for j:=1 to n do begin if a[byte(b[j])] < i then i := a[byte(b[j])]; end; write(i); end. 풀이 : 문자별로 입력된 개수 만큼 + 을 해준..
Pascal/BAEKJOON
2023. 11. 1. 02:45
c언어 12904번 A와 B (백준)
#include #include int main(void) { char s[1005] = {}; char t[1005] = {}; scanf("%s", s); scanf("%s", t); int s_len = strlen(s); int t_len = strlen(t); for(int i = t_len-1; i>s_len-1; i--) { //t->s 로 맨 뒤를 제거하면서 if(t[i] == 'B') { //마지막이 B이면 앞에 것을 뒤집기 t[i] = 0; //마지막거 지우기 char tmp[1005] = {}; for(int j = 0; j
c언어/BAEKJOON
2022. 10. 1. 15:54
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- java
- 6198번
- 최대공약수
- 1835번
- 그리디
- 그래프
- 세그먼트 트리
- DFS
- 스택
- 6198
- 1835
- C언어
- 16120번
- 카드
- Krustal
- 트리
- 누적합
- DP
- union
- 정렬
- 누적 합
- 오프라인 쿼리
- 플로이드
- find
- BFS
- 최소 스패닝 트리
- Mo.s
- C++
- 덱
- 백준
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함