일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- HTTP
- 연결리스트
- AVL트리
- 연결리스트 종류
- posix
- jpa n+1 문제
- 엔티티 그래프
- heapq
- 점근적 표기법
- 프로세스
- SpringSecurity
- 최소힙
- 힙트리
- MSA
- 이분탐색이란
- spring
- 운영체제
- Kruskal
- 백준 장학금
- 백준장학금
- JPA
- 멀티프로세서
- 강화학습
- JVM
- python
- 자료구조
- 완전이진트리
- 스케줄링
- 최대 힙
- 알고리즘
- Today
- Total
목록기타/백준 (2)
KKanging
from sys import stdin input = stdin.readline N,M,Q = map(int,input().split(" ")) row = {i:0 for i in range(N+1)} col = {i:0 for i in range(M+1)} for i in range(Q): n1,n2,n3 = map(int,input().split(" ")) if n1 == 1: row[n2] += n3 elif n1 == 2: col[n2] += n3 for i in range(1,N+1): for j in range(1,M+1): print(row[i]+col[j],end=" ") print() 풀이방법 n1 은 행 더하기인지 n2는 인덱스 n3는 더해지는 값으로 마지막 출력할 때 i행 j열의 더해..
from sys import stdin from collections import deque input = stdin.readline N = int(input()) str_li = [] s1 , s2 = '@','@' for i in range(N): temp = input()[:-1] #문자열 if temp == "?": if str_li: s1 = str_li[-1][-1] else: pass if str_li: if str_li[-1] == '?': s2 = temp[0] str_li.append(temp) M = int(input()) for i in range(M): temp = input()[:-1] if (temp[0] == s1 or s1=='@') and (temp[-1] == s2 or..