This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Notion exported filenames looks like the following format. | |
# "<filename> <hashvalue32>.<ext>" | |
# Get the filename with string slicing | |
# Add the contents of file if there is the same filename. | |
import os, shutil | |
def removeHashes(): | |
cwd = os.getcwd() | |
copyto = os.path.join(cwd, 'welldone1') | |
for file in os.listdir(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.github-markdown-body { | |
font-family: 'Pretendard'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<locale> | |
#include<string> | |
using namespace std; | |
int main() | |
{ | |
locale myloc("<local machine locale or current locale>"); | |
cin.imbue(myloc); | |
cout.imbue(myloc); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.function.Function; | |
import java.util.stream.Collectors; | |
public class Solution { | |
private List<Integer> clkwiseidxing(int n, int[] weak, int start) { | |
// clockwise | |
// 넘어가면 바퀴 수에 따라 더해준다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
bustable, timetable 변환하기는 쉬우니 넘어가자. | |
- 버스 시간보다 빨리 온 사람을 확인해서 넣을 수 있는 인원 m명만큼 넣는다. | |
bussimulation한다. 마지막버스 빼고. | |
- 이러다가 마지막 버스인 걸 확인할 경우 또 뭔가를 해야한다. | |
이걸 하나에 다 담으려고 하지마라. 생각의 한계에 부딫을 경우 함수로 나누자. | |
마지막 버스에서는 버스에 담길 사람이 중요하므로 **버스에 안담길 사람을 모두 제거한다.** | |
m명 확인해서 콘이 어디에 올지 확인해주면 된다. | |
- 저 2가지를 같이 생각하면 머리 아프다... | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<List<Integer>> permutation(int[] n){ | |
List<List<Integer>> ret = new ArrayList<>(); | |
permutation(new ArrayList<>(), n, ret); | |
System.out.println(ret.size()); | |
return ret; | |
} | |
void permutation(List<Integer> prefix, int[] n, List<List<Integer>> result){ | |
if(n.length==0){ | |
result.add(prefix); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<List<Integer>> combination(int[] n, int r){ | |
List<List<Integer>> ret = new ArrayList<>(); | |
combination(new ArrayList<>(), n, r, ret); | |
System.out.println(ret); | |
return ret; | |
} | |
void combination(List<Integer> prefix, int[] n, int r, List<List<Integer>> result){ | |
if(r==0) result.add(prefix); | |
else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<List<Integer>> permute(List<Integer> input){ | |
List<List<Integer>> result = new ArrayList<>(); | |
permute(new ArrayList<>(), input, result); | |
return result; | |
} | |
void permute(List<Integer> remain, List<Integer> input, List<List<Integer>> result){ | |
if(input.isEmpty()){ | |
result.add(remain); | |
return; |