백준 8370번 planehttps://www.acmicpc.net/problem/8370 8370번: PlaneIn the first and only line of the standard input there are four integers n1, k1, n2 and k2 (1 ≤ n1, k1, n2, k2 ≤ 1 000), separated by single spaces.www.acmicpc.net 정답 코드#include int main() { int n1, n2, k1, k2; scanf("%d %d %d %d", &n1, &k1, &n2, &k2); printf("%d", (n1*k1)+(n2*k2)); return 0; }
백준 7785번 회사에 있는 사람https://www.acmicpc.net/problem/7785 7785번: 회사에 있는 사람첫째 줄에 로그에 기록된 출입 기록의 수 n이 주어진다. (2 ≤ n ≤ 106) 다음 n개의 줄에는 출입 기록이 순서대로 주어지며, 각 사람의 이름이 주어지고 "enter"나 "leave"가 주어진다. "enter"인 경우는 www.acmicpc.net 정답 코드#include #include #include #include #include #include #include using namespace std; map member; map enter_log; int main() { int N; string name, state; cin >> N; for (int i = 0; i ..
백준 7576번 토마토https://www.acmicpc.net/problem/7576 7576번: 토마토첫 줄에는 상자의 크기를 나타내는 두 정수 M,N이 주어진다. M은 상자의 가로 칸의 수, N은 상자의 세로 칸의 수를 나타낸다. 단, 2 ≤ M,N ≤ 1,000 이다. 둘째 줄부터는 하나의 상자에 저장된 토마토www.acmicpc.net 정답 코드#include #include using namespace std; int arr[1001][1001]; int dis[1001][1001]; int dx[4] = { 1,0,-1,0 }; int dy[4] = { 0,1,0,-1 }; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.ti..
백준 7569번 토마토https://www.acmicpc.net/problem/7569 7569번: 토마토첫 줄에는 상자의 크기를 나타내는 두 정수 M,N과 쌓아올려지는 상자의 수를 나타내는 H가 주어진다. M은 상자의 가로 칸의 수, N은 상자의 세로 칸의 수를 나타낸다. 단, 2 ≤ M ≤ 100, 2 ≤ N ≤ 100, www.acmicpc.net 정답 코드#include #include #include using namespace std; vector dir = { {-1,0,0}, {1,0,0}, {0,1,0}, {0,-1,0}, {0,0,1}, {0,0,-1} }; queueq; int arr[101][101][101]; bool vis[101][101][101]; int time1[101][..
- Total
- Today
- Yesterday
- 반복문
- html
- 알고리즘
- 백준
- CSS
- BFS
- DP
- 알고리즘 공부
- 유클리드 호제법
- 자바
- HTML5
- java
- 에라토스테네스의 체
- C++
- 세그먼트 트리
- c++ string
- DFS
- 백준 풀이
- 투 포인터
- 이분 매칭
- 카운팅 정렬
- 스프링 부트 crud 게시판 구현
- Do it!
- 자료구조
- 우선순위 큐
- 스택
- js
- 유니온 파인드
- 자바스크립트
- C++ Stack
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
