문제https://www.acmicpc.net/problem/11721 11721번: 열 개씩 끊어 출력하기첫째 줄에 단어가 주어진다. 단어는 알파벳 소문자와 대문자로만 이루어져 있으며, 길이는 100을 넘지 않는다. 길이가 0인 단어는 주어지지 않는다.www.acmicpc.net 해설txt = input()for i in range((len(txt) / 10).__ceil__()): print(txt[i * 10 : (i + 1) * 10])
문제https://www.acmicpc.net/problem/28288 28288번: Special EventThe first line of input will contain a positive integer $N$, representing the number of people interested in attending your event. The next $N$ lines will each contain one person's availability using one character for each of Day $1$, Day $2$, Day $3$, Daywww.acmicpc.net 해설numpy를 사용 못하니 map을 이용해서 계산해보았다. person = int(input())schedule =..
문제https://www.acmicpc.net/problem/11399 11399번: ATM첫째 줄에 사람의 수 N(1 ≤ N ≤ 1,000)이 주어진다. 둘째 줄에는 각 사람이 돈을 인출하는데 걸리는 시간 Pi가 주어진다. (1 ≤ Pi ≤ 1,000)www.acmicpc.net 해설정렬 후 최소단위 작업부터 시작하여 누적 합계를 구하면 된다. OS에서 SJF(Shortest Job First Scheduling)라는 프로세스 스케줄링 기법과 동일한 방법이다. #include#includeusing namespace std;void atm(){ int n; int temp = 0; int res = 0; cin >> n; int* times = new int[n]; for (int i = 0; i..
문제https://www.acmicpc.net/problem/6973 6973번: Dynamic Dictionary CodingA common method of data compression, "dictionary coding", is to replace words in a text by numbers indicating their positions in a dictionary. Static dictionary coding, in which the dictionary is known in advance, can be problematic, as it is necessary towww.acmicpc.net 해설처음 입력된 case만큼의 단어 사전을 만드는 문제이다. 각 case는 여러 문장을 입력받고 모든..
1. 주요 개념 BGP(Border Gateway Protocol) AS(Autonomous) BGP(Border Gateway Protocol)는 OSPF의 Area라는 개념과 비슷한 AS(Autonomous)라는 개념을 사용해서 통신한다. 서로 다른 AS 간의 BGP Session을 External BGP, 동일 AS내의 BGP Router 간의 BGP Session을 Internal BGP라고 한다. 아래는 미리 구상된 토폴로지의 구조이다. 위 토폴로지를 토대로 네트워크를 구축한다. 2. 구축 BGP의 명령은 아래와 같다. set protocols bgp [as number] neighbor [neighbor network address] remote-as '[neighbor as number]' ..
데이터가 가진 특성에 대해 판단할 때 대표적으로 평균(mean), 중앙값(median), 최빈값(mode) 등을 이용하여 추정할 수 있다. 각 방법은 아래와 같은 특징들이 있다.평균(mean)산술 평균, 기하 평균, 조화 평균 등의 방식이 있다.변수의 관찰값들을 모두 계산한 것이므로 대푯값으로 바람직하다.추상적인 의미를 가진다.특이값의 영향을 받는 단점이 있다.중앙값(median), 최빈값(mode)특이값의 영향을 받지 않는다.중앙값은 데이터를 크기순서로 정리해야 하는 불편함이 있다.최빈값은 데이터가 적거나 복잡하면 구할 수 없다. 이번 포스트에선 평균에 대해 더 자세히 알아보려 한다. 산술 평균(Arithmetic mean)산술 평균(Arithmetic mean)은 우리가 알고 있는 가장 보편적인 평균..