Skip to content

Instantly share code, notes, and snippets.

View wlsvy's full-sized avatar

Jinpyo Kim wlsvy

  • Nexon
  • Seoul, South Korea
View GitHub Profile
@wlsvy
wlsvy / Fibers.cs
Created June 14, 2024 11:34 — forked from Horusiath/Fibers.cs
Minimal example of working async method builder
using System;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
using System.Threading;
namespace Fibers
{
public struct AsyncFiberMethodBuilder<T>
{
private Fiber<T>? fiber;
@wlsvy
wlsvy / CPP_IOS_Example.md
Last active August 12, 2020 16:24
C++ IOS API에서 유용하다 싶은 부분을 주관적으로 작성한 문서입니다.
@wlsvy
wlsvy / synchronous-shopping.cpp
Last active August 7, 2020 16:00
Hackerrank - synchronous-shopping
#include <bits/stdc++.h>
using namespace std;
struct edge {
int to;
int weight;
};
struct shop
{
int fishMask;
@wlsvy
wlsvy / EatingShow.cpp
Created August 7, 2020 12:13
프로그래머스 / 무지의 먹방 라이브
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
vector<LL> Food;
int solution(vector<int> food_times, long long k) {
copy(food_times.begin(), food_times.end(), back_inserter(Food));
if (k >= accumulate(Food.begin(), Food.end(), 0ll)) return -1;
LL cnt = 0;
@wlsvy
wlsvy / CandidateKey.cpp
Created August 7, 2020 11:23
프로그래머스 / 후보키
#include <bits/stdc++.h>
using namespace std;
int row, col;
vector<vector<string>> Relation;
set<int> Key;
bool isUnique(int mask) {
vector<string> accum(row);
for (int c = 0; c < col; c++) {
@wlsvy
wlsvy / MatchingScore.cpp
Created August 5, 2020 18:43
프로그래머스 매칭 점수
#include <bits/stdc++.h>
using namespace std;
struct urlInfo {
int index;
vector<string> refUrl;
double baseScore;
double matchingScore;
};
@wlsvy
wlsvy / BlockGame.cpp
Last active August 6, 2020 10:04
프로그래머스 블록게임
#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
vector<vector<int>> TargetBlocks[5] = {
{
{1, 0},
{1, 0},
{1, 1}
},
{
@wlsvy
wlsvy / 3xN_tiling.cpp
Last active August 5, 2020 04:17
프로그래머스 레벨 4: 3 x n 타일링
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
constexpr int mod = 1000000007;
LL dp0[5002];
LL dp1[5002];
int solution(int n) {
@wlsvy
wlsvy / Programmers_theft.cpp
Created August 5, 2020 02:53
프로그래머스 레벨 4 : 도둑질
#include <bits/stdc++.h>
using namespace std;
int dp0[1000003];
int dp1[1000003];
int solution(vector<int> money) {
int N = money.size();
dp0[0] = money[0];
dp1[0] = 0;