Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
85f610f
[honux] programmers h-index
honux77 May 27, 2019
891a6c2
Add 190530 problem
honux77 May 30, 2019
0ee56d3
[소니] 프로그래머스 모의고사 알고리즘 풀이 (#45)
sonypark Jun 3, 2019
0782620
Wangmin 190530 문제풀이 (#57)
Min-92 Jun 3, 2019
92c686a
Su (#46)
jeongyongsu5366 Jun 3, 2019
8a125d3
feat: H index, 모의고사 풀이 (#47)
jeuk817 Jun 3, 2019
008cc18
[ingleby]190527 algorithm (#48)
gminiy Jun 3, 2019
291a605
[190527] H 알고리즘 문제풀이 제출합니다. (#49)
hsycamp Jun 3, 2019
aba7819
[mukeunzi] 190528 모의고사 알고리즘 문제풀이 (#50)
mukeunzi Jun 3, 2019
3f1576c
[ruby] 모의고사 보냅니다. (#52)
ruby413 Jun 3, 2019
380f6d3
Nailer Solve programmers supoja problem (#53)
seongheum-choi Jun 3, 2019
d314a08
[Jake] 190530 달팽이 알고리즘 문제풀이 (#54)
cocahack Jun 3, 2019
21661d8
프로그래머스 - 모의고사 문제 풀이 (#56)
bestdevhyo1225 Jun 3, 2019
7ac73a6
BOJ 1913 snail (#60)
honux77 Jun 3, 2019
8dfe335
달팽이 (#62)
bestdevhyo1225 Jun 10, 2019
8dd49df
Honux (#63)
honux77 Jun 11, 2019
cc9b7a1
[sony] algorithm, programmers findPrimeNumber (#65)
sonypark Jun 12, 2019
12e3a6d
feat: 19년 6월 12일 PS 솔루션 업데이트 (#67)
cocahack Jun 12, 2019
65677ac
[Programmers - 42839] 소수 찾기 문제 풀이 (#66)
bestdevhyo1225 Jun 12, 2019
e0e1e69
Honux (#68)
honux77 Jun 13, 2019
97db8c4
feat: 19년 6월 13일 PS 솔루션 업데이트 (#69)
cocahack Jun 15, 2019
5200d07
수 정렬하기3 (#70)
bestdevhyo1225 Jun 15, 2019
1d384c8
[Sony] BOJ algorithm 10989 (#71)
sonypark Jun 15, 2019
b056159
Honux (#72)
honux77 Jun 15, 2019
ae36b7b
[H] 소수찾기 문제풀이 제출합니다. (#73)
hsycamp Jun 16, 2019
1ecd900
[wangmin] 수 정렬하기 3 (#74)
Min-92 Jun 18, 2019
0a84b12
Honux (#75)
honux77 Jun 18, 2019
5a7e616
Jake 문제 추가 (#77)
honux77 Jun 21, 2019
c01004c
Try to solve BOJ 2580 Sudoku
honux77 Jun 27, 2019
cb49e22
Merge branch 'be2020' into honux
honux77 Feb 4, 2020
764e953
20024 알고리즘 - 프로그래머스 문자열 압축
honux77 Feb 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ typings/

# next.js build output
.next

# for cpp
a.out
54 changes: 54 additions & 0 deletions 190624/2580-sudoku.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#include <iostream>
#include <map>

int b[9][9];

using namespace std;

vector<int> findNums(int i,int j) {
//map <int, bool> nums;
//checkv(i, nums);
//checkh(j, nums);
//checkbox(i,j, nums);
}

bool find = false;

void fillNums(int i, int j) {
if (find) return;
if (i == 9 && j == 9 && b[i][j] != 0) {
find = true;
return;
}

int jn = j < 9 ? j + 1: j;
int in = jn == j && i < 9; i + 1: i;

if (b[i][j] == 0) {
vector <int> nums = findNums(i,j);
if (nums.size() == 0) return;
for (auto n: nums) {
board[i][j] = n;
fillNums(in, jn);
}
}
return;
}

int main() {
char c;
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
cin >> c;
b[i][j] = c - '0';
}
}
fillNums(0,0);
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
cout << b[i][j] << " ";
}
cout << "\n";
}
return 0;
}
9 changes: 9 additions & 0 deletions 190624/input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
0 3 5 4 6 9 2 7 8
7 8 2 1 0 5 6 0 9
0 6 0 2 7 8 1 3 5
3 2 1 0 4 6 8 9 7
8 0 4 9 1 3 5 0 6
5 9 6 8 2 0 4 1 3
9 1 7 6 5 2 0 8 0
6 0 3 7 0 1 9 5 2
2 5 8 3 9 4 7 6 0
56 changes: 56 additions & 0 deletions 200204/60057-Solution.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//programmers 60057 카카오 공채 문자열 압축
//어렵진 않은데 시간이 오래 걸렸다.

import java.util.List;
import java.util.ArrayList;

class Solution {

private List<String> cutString(String origin, int size) {
List<String> ret = new ArrayList<>();
for (int i = 0; i < origin.length(); i += size) {
int e = (i + size) > origin.length() ? origin.length(): i + size;
String str = origin.substring(i, e);
ret.add(str);
}
return ret;
}

private String findCompressString(String str, int size) {
List<String> slist = cutString(str, size);

int count = 0;
StringBuffer newStr = new StringBuffer();

String prev = slist.get(0);
newStr.append(prev);
int repeat = 1;
for (int i = 1; i < slist.size(); i++) {
String curr = slist.get(i);
if(curr.equals(prev)) {
repeat++;
} else {
if (repeat != 1) {
newStr.append(Integer.toString(repeat));
repeat = 1;
}
newStr.append(curr);
prev = curr;
}
}

if (repeat != 1) {
newStr.append(Integer.toString(repeat));
}
return newStr.toString();
}

public int solution(String s) {
int ans = s.length();
for(int i = 1; i < s.length(); i++) {
ans = Math.min(ans, findCompressString(s, i).length());
}
return ans;
}
}