| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 멀티폼
- vm도커설치하는법
- 스프링부트api
- 스프링사진업로드
- 출처 메타코딩
- 도커설치하는법
- 스프링부트서버에사진전송
- dockerinstall
- 스프링부트팔로우취소
- 우분투도커설치
- 출처 따배도
- 인스타클론
- 스프링부트사진올리기
- 스프링부트팔로잉
- 출처 노마드코더
- 스프링사진
- springboot_exception_handler
- 서버에도커설치
- 스프링익셉션처리
- 스프링부트
- 스프링이미지업로드
- 파이썬sort
- 스프링구독
- 출처 코딩셰프
- WAS웹서버
- centos도커설치
- 출처 문어박사
- 스프링부트중복예외처리
- ssh도커설치
- 스프링부트구독취소
- Today
- Total
목록Algorithm (66)
MakerHyeon
https://leetcode.com/problems/container-with-most-water/description/ Container With Most Water - LeetCode Can you solve this real interview question? Container With Most Water - You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]). Find two lines that toget leetcode.com 해당문제는 bruteforce로 풀면 n..
https://www.acmicpc.net/problem/13300 13300번: 방 배정 표준 입력으로 다음 정보가 주어진다. 첫 번째 줄에는 수학여행에 참가하는 학생 수를 나타내는 정수 N(1 ≤ N ≤ 1,000)과 한 방에 배정할 수 있는 최대 인원 수 K(1 < K ≤ 1,000)가 공백으로 분리되어 www.acmicpc.net 먼저 input을 받고, students 이중배열로 각 학년별 [여,남] 인원수를 받는다. 조건은 같은 학년,성별끼리 배정해야한다는 것이다. 따라서 각 배열 원소//k로 몫을 방개수에 더해주고,만약 나머지가있다면(2//3==2)방이 하나더 필요한 것이므로 +1을 해준다.복잡해보이지만 이중배열로 생각했을시 쉽게 풀리는 문제였음....;; SOLUTION CODE # PYT..
https://www.acmicpc.net/problem/3273 3273번: 두 수의 합 n개의 서로 다른 양의 정수 a1, a2, ..., an으로 이루어진 수열이 있다. ai의 값은 1보다 크거나 같고, 1000000보다 작거나 같은 자연수이다. 자연수 x가 주어졌을 때, ai + aj = x (1 ≤ i < j ≤ n)을 만족하는 www.acmicpc.net 그렇게 많이 연습한 투포인터문제! 반갑군... SOLUTION CODE # PYTHON import sys N = int(input()) li = list(map(int,sys.stdin.readline().split())) M = int(input()) l,r = 0, N-1 res = 0 li.sort() while l
https://www.acmicpc.net/problem/1475ㅇ 1475번: 방 번호 첫째 줄에 다솜이의 방 번호 N이 주어진다. N은 1,000,000보다 작거나 같은 자연수이다. www.acmicpc.net 먼저 input을 받고, 0~9의 빈도수를 담을 li를 0으로 초기화한다. 그후 input의 각 자리 숫자에 대해서 li[각자리숫자]+=1을 해준다. 이때, 9인경우 6과 동일하게 보기때문에 li[6]에 숫자를 더해준다. 그 후 2로나누어 준다. 여기서 주의점은 99999처럼 홀수일때는 몫이3이 나오도록 +1을 한후 나누어주어야한다는것이다. 마지막으로 필요한 세트 개수의 최솟값이므로, 각 숫자빈도수중 최대값을 출력해준다. SOLUTION CODE # PYTHON n = input() li = ..
https://www.acmicpc.net/problem/1267 1267번: 핸드폰 요금 동호가 저번 달에 이용한 통화의 개수 N이 주어진다. N은 20보다 작거나 같은 자연수이다. 둘째 줄에 통화 시간 N개가 주어진다. 통화 시간은 10,000보다 작거나 같은 자연수이다. www.acmicpc.net 파이썬 정수몫은 // 임에 유의하자! (파이썬 C++ 같이 푸려다보니까 헷갈렸다ㅜ.) SOLUTION CODE # PYTHON N = int(input()) li = list(map(int,input().split())) Y = 0 M = 0 for i in li: # 영식 요금제 Y+= (i // 30+1)*10 M+= (i // 60+1)*15 if YM: print("M",M) else: print..
https://leetcode.com/problems/3sum/description/ 3Sum - LeetCode Can you solve this real interview question? 3Sum - Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not contain du leetcode.com 합이 0 인 세 숫자의 인덱스를 구하는 문제이다. 이전에 풀었던 SumII 문제와 유사하다. brute force를..
https://www.acmicpc.net/problem/7569 7569번: 토마토 첫 줄에는 상자의 크기를 나타내는 두 정수 M,N과 쌓아올려지는 상자의 수를 나타내는 H가 주어진다. M은 상자의 가로 칸의 수, N은 상자의 세로 칸의 수를 나타낸다. 단, 2 ≤ M ≤ 100, 2 ≤ N ≤ 100, www.acmicpc.net SOLUTION CODE # PYTHON from collections import deque M, N, H = map(int, input().split()) arr = [[list(map(int, input().split())) for _ in range(N)] for _ in range(H)] def bfs(): # [1] q생성, v[]생성 q = deque() v =..
https://leetcode.com/problems/design-browser-history/description/ Design Browser History - LeetCode Can you solve this real interview question? Design Browser History - You have a browser of one tab where you start on the homepage and you can visit another url, get back in the history number of steps or move forward in the history number of steps. Implem leetcode.com SOLUTION CODE # PYTHON 1) do..