본문 바로가기

전체 글

(60)
[백준] 10814 나이순 정렬 https://www.acmicpc.net/problem/10814 sort package에 stable sort가 있긴한데 그냥 안썼다. package main import ( "bufio" "fmt" "os" "sort" ) var writer = bufio.NewWriter(os.Stdout) var reader = bufio.NewReader(os.Stdin) func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) } func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) } type Person struct { age int order int name str..
[백준] 11651 좌표 정렬하기 2 https://www.acmicpc.net/problem/11651 package main import ( "bufio" "fmt" "os" "sort" ) var writer = bufio.NewWriter(os.Stdout) var reader = bufio.NewReader(os.Stdin) func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) } func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) } type Point struct { x, y int } type SortBy []Point func (a SortBy) Len() int { return l..
[백준] 11650 좌표 정렬하기 package main import ( "bufio" "fmt" "os" "sort" ) var writer = bufio.NewWriter(os.Stdout) var reader = bufio.NewReader(os.Stdin) func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) } func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) } type Point struct { x, y int } type SortBy []Point func (a SortBy) Len() int { return len(a) } func (a SortBy) Swap(i, j int)..
[백준] 2108 통계학 https://www.acmicpc.net/problem/2108 package main import ( "bufio" "fmt" "os" "sort" ) var writer = bufio.NewWriter(os.Stdout) var reader = bufio.NewReader(os.Stdin) func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) } func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) } func sumsum(arr []int) (result int) { for _, i := range arr { result += i } return } fun..
[백준] 2751 수 정렬하기 golang https://www.acmicpc.net/problem/2751 golang에서 sort의 사용법을 알아보자 package main import ( "bufio" "fmt" "os" "sort" ) var writer = bufio.NewWriter(os.Stdout) var reader = bufio.NewReader(os.Stdin) func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) } func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) } func main() { defer writer.Flush() var n int scanf("%d\n", &n) ..
[백준] 1436 영화감독 숌 https://www.acmicpc.net/problem/1436 N번째로 작은 종말의 숫자를 찾는 문제이다. package main import ( "bufio" "fmt" "os" ) var writer = bufio.NewWriter(os.Stdout) var reader = bufio.NewReader(os.Stdin) func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) } func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) } var endOfWorldNums = make([]int, 10004) func checkThreepleSix(n int) b..
[백준] 1018 체스판 다시 칠하기 https://www.acmicpc.net/problem/1018 모든칸을 한칸씩 돌면서 문자가 바뀌는지 확인하면 최악의 경우의 수를 따져보니까 대충 이렇게 나와서 왠지 그냥 다돌아도 시간초과 안날 것 같아서 다 돌기로 했다. package main import ( "bufio" "fmt" "os" ) var writer = bufio.NewWriter(os.Stdout) var reader = bufio.NewReader(os.Stdin) func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) } func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) } var t..
chocolatey 소개 package manager for windows https://chocolatey.org/ Chocolatey - The package manager for Windows Chocolatey is software management automation for Windows that wraps installers, executables, zips, and scripts into compiled packages. Chocolatey integrates w/SCCM, Puppet, Chef, etc. Chocolatey is trusted by businesses to manage software deployments. chocolatey.org 윈도우에는 ubuntu같은 리눅스에 보통 기본적으로 설치되는 package manager가 없다. 그래서 어떤 ..