전체 글(331)
-
[Oracle vm] Ubuntu shared folder 만들기
0. ubuntu에서 만든 파일을 local 환경에서 쓰고싶었다. 하지만, 복사가 불가능했고, shared folder를 생성하여야했다. 1. Shared Folder (공유 폴더) 설정 (가장 간단한 방법)Oracle VM VirtualBox에서는 가상 머신과 호스트(로컬 컴퓨터) 간에 파일을 쉽게 공유할 수 있는 공유 폴더 기능이 있습니다. 이 방법이 가장 직관적이고 간편합니다.공유 폴더 설정 방법:VirtualBox 설정:가상 머신을 실행하지 않은 상태에서 VirtualBox 메인 창에서 가상 머신을 선택한 후, 상단의 Settings(설정) 버튼을 클릭합니다.설정 메뉴에서 Shared Folders(공유 폴더) 탭을 클릭합니다.오른쪽 상단의 **폴더 추가 아이콘(+)**을 클릭하여 공유할 폴더를..
2024.09.22 -
[BOJ] 2156번 : 포도주 시식
1. problem : https://www.acmicpc.net/problem/2156 2. solution 1 :#include using namespace std;int n; int d[10005][3]; int a[10005];int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> n; for (int i = 1; i > a[i]; d[1][1] = a[1]; for (int i = 2; i source code 출처 : https://github.com/encrypted-def/basic-algo-lecture/blob/master/0x10/solutions/2156_1.cpp basic-algo-lecture/0x10/solutions..
2024.09.22 -
[BOJ] 11656번 : 접미사 배열
1. problem : https://www.acmicpc.net/problem/11656 2. solution 1: #include using namespace std;string s; vector prefix; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> s; for (int i = 0; i prefix라는 배열을 만들어, 접미사들을 추가했다. 정렬은 sort()를 이용했고 , 비교연산자는 lambda함수로 작성했다. 3. solution 2 : // Authored by : std-freejia// Co-authored by : -//http://boj.kr/21378a10916b42d19dce4bc7c841a73c#include ..
2024.09.21 -
[BioPython] Bio.SwissProt
0. SwissProt이란 단백질 데이터베이스라고한다. 이번장에서는 SwissProt을 Biopython을 이용해 사용하는 방법을 다루고자한다. 1. 사용법 from Bio import SwissProt handle = open(file path) record = SwissProt.read(handle) print(type(record)) handle.close()output 2. Swiss-Prot.record 객체를 parsing하기 SwissProt.Record 객체를 생성하면, SwissProt 파일에대한 정보가 record에 담겨있다. 따라서, 필요한 정보를 가져오면된다. from Bio import SwissProt handle = open("../swissprot/P02649.txt") ..
2024.09.21 -
[BOJ] 14002번 : 가장 긴 증가하는 부분 수열 4
1. problem : https://www.acmicpc.net/problem/14002 2. solution 1: #include using namespace std;const int nums = 1005;int A; int a[nums]; int d[nums]; int pre[nums]; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> A; for (int i = 1; i > a[i]; for (int i = 1; i = a[i]) continue; if (d[i] dq; dq.push_front(mx_idx); cout dp를 이용해 풀었다. 따라서, 세 가지 스텝으로 문제를 풀어나갔다. 첫 번째, 테이블을 정의한다. d..
2024.09.21 -
[Vim] Clipboard에 복사하기
0. vim --version을 통해 , clipboard가 +인지 -인지 확인하자. 1. -라면 sudo apt install vim-gtk3설치하자. 2.ggVG"+ygg : 파일의 처음으로 이동V : 라인 비주얼 모드로 전환G : 파일의 끝까지 선택"+y : 선택한 텍스트를 시스템 클립보드에 복사을 통해 복사하면 된다.
2024.09.20