Skip to content

Instantly share code, notes, and snippets.

@Yimyujin
Yimyujin / [Baekjoon] 2096_내려가기.c
Created February 9, 2019 11:00
[Baekjoon] 2096_내려가기
#pragma warning (disable:4996)
/*
* 시간 : 28ms
* 메모리 : 1116kb
*/
#include <stdio.h>
#define min(a,b) ((a) > (b) ? (b) : (a))
#define max(a,b) ((a) < (b) ? (b) : (a))
int d[2][6];
@Yimyujin
Yimyujin / [Codejam_2017]Problem C_Bathroom Stalls.c
Created February 6, 2019 02:58
Problem C_Bathroom Stalls.c
#pragma warning (disable:4996)
#include <stdio.h>
/*
* 속도 : O(log K)
* 메모리 : O(log N)
*/
struct STALL{
long long n;
long long k;
};
#pragma warning (disable:4996)
#include <stdio.h>
/*
* 속도 : O(N)
* 메모리 : O(N)
*/
char num[19];
char ans[19];
int len;
int get_len(char *str) {
@Yimyujin
Yimyujin / Problem A_Oversized Pancake Flipper.c
Last active January 30, 2019 14:27
[Codejam_2017]Problem A_Oversized Pancake Flipper.c
#pragma warning (disable:4996)
/*
* 메모리 : O(S)
* 시간 : O(N*K)
*/
#include <stdio.h>
int T, k;
char pancake[1001];
int pancake_len;
@Yimyujin
Yimyujin / [Baekjoon]1504_특정한최단경로.c
Created January 27, 2019 06:23
[Baekjoon]1504_특정한최단경로
/*
* [Baekjoon]1504_특정한최단경로
* 메모리 : 13504 KB
* 시간 : 160ms
*/
#pragma warning (disable:4996)
#include <stdio.h>
#include <malloc.h>
#define NSIZE 801
@Yimyujin
Yimyujin / [Baekjoon]1181_단어정렬.c
Last active January 12, 2019 06:46
[Baekjoon]1181번 단어정렬
/* 메모리:2268KB 시간:36ms */
#pragma warning (disable:4996)
#include <stdio.h>
char str[20000][51];
int tmp[40000];
int n;
int strcomp(char *a, char *b) {
int i;
for (i = 0; a[i] == b[i] && a[i] && b[i]; ++i);