Skip to content

Instantly share code, notes, and snippets.

View malkoG's full-sized avatar
😎
FULL SWAG DEVELOPER WANNABE

Lee Jae-yeol malkoG

😎
FULL SWAG DEVELOPER WANNABE
View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@malkoG
malkoG / 9935.kt
Created April 5, 2019 07:43
noj.am/9935
import java.util.*
fun main(args: Array<String>) = with(Scanner(System.`in`)) {
var state_stack = Stack<Int>()
val text = nextLine()
val pattern = nextLine()
var cursor = 0
var result = StringBuilder()
@malkoG
malkoG / [BOJ] 9935.py
Created April 4, 2019 09:10
noj.am/9935
target_string=input()
pattern=input()
result = ""
state_stack = []
pattern_length = len(pattern)
cursor = 0
for i in range(len(target_string)):
result += target_string[i]
import string
LEFT_PAREN, RIGHT_PAREN, HEX_DIGIT, ALPHABET, ENCLOSING, SPACE, COLON, AMP, HEX_START = range(9)
def translate(ch):
if ch in string.hexdigits:
return HEX_DIGIT
elif ch in string.ascii_letters or ch in string.digits:
return ALPHABET
elif ch is '/':
@malkoG
malkoG / [BOJ] 2733.py
Created March 25, 2019 16:21
noj.am/2733
n=int(input())
for i in range(n):
pointer = 0
byte_array = [0] * 32768
left_stack = [-1] * 128000
right_stack = [-1] * 128000
validation_stack = []
command = ""
@malkoG
malkoG / [BOJ] 6642.py
Created March 25, 2019 16:16
noj.am/6642
def translate(dotted_cash):
over_dot, under_dot = map(int, dotted_cash.split("."))
return over_dot * 100 + under_dot
output = []
while True:
n=int(input())
bank = dict()
if n == 0:
@malkoG
malkoG / [BOJ] 2799.py
Last active March 18, 2019 11:36
noj.am/2799
rows,cols=map(int, input().split())
apartment=[input() for i in range(0, rows*5+1)]
window_counts=[0,0,0,0,0]
for row in range(0,rows):
current_row = 5*row+1
for col in range(0,cols):
matches = 0
current_col = 5*col+1
for i in range(0, 4):
if apartment[current_row+i][current_col:current_col+4] == '****':
@malkoG
malkoG / [BOJ] 11586.py
Last active March 18, 2019 11:35
noj.am/11586
n=int(input())
mirror = [ input() for i in range(0,n) ]
state = int(input())
display = mirror[::-1] if state > 2 else mirror
for line in display:
print(line if state % 2 == 1 else line[::-1])
@malkoG
malkoG / [BOJ] 10821.py
Created March 18, 2019 10:41
noj.am/10821
print(input().count(',')+1)
@malkoG
malkoG / [BOJ] 11023.py
Created March 18, 2019 10:36
noj.am/11023
raw_text=input()
int_array=map(int, raw_text.split())
print(sum(int_array))