Skip to content

Instantly share code, notes, and snippets.

View SiwonLim's full-sized avatar
๐ŸŠ
Focusing

Siwon Lim(Beth) SiwonLim

๐ŸŠ
Focusing
View GitHub Profile
@SiwonLim
SiwonLim / 20210407_01.cs
Last active April 7, 2021 01:05
20210407_01
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Net;
public partial class CustomScript
@SiwonLim
SiwonLim / Example.java
Created March 28, 2021 02:17
Retrofit Post์‹œ Header์„ค์ •
@FormUrlEncoded
@POST("์ž‘์—…URL์ฃผ์†Œ")
@Headers("Content-Type:application/x-www-form-urlencoded; charset=utf-8")
Call<ConsultingRes> regiConsultation(@Field("data") String request);
@SiwonLim
SiwonLim / ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค_๋ฉ€์ฉกํ•œ์‚ฌ๊ฐํ˜•.cpp
Created April 17, 2020 09:22
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค_๋ฉ€์ฉกํ•œ์‚ฌ๊ฐํ˜•.cpp
#include <iostream>
using namespace std;
int gcd(long long a, long long b){
int tmp,min,max;
if(a < b) {min = a, max=b;}
else {min = b; max = a;}
while(min != 0){
tmp = (max % min);
max = min;
@SiwonLim
SiwonLim / ์Šคํ‚ฌํŠธ๋ฆฌ_Java.java
Last active April 17, 2020 08:41
์Šคํ‚ฌํŠธ๋ฆฌ_Java.java
import java.util.ArrayList;
import java.util.List;
class Solution {
public static int solution(String skill, String[] skill_trees) {
int answer = 0;
for(int i = 0 ; i < skill_trees.length ; i++){
List<Character> list = new ArrayList<Character>();
for(int j = 0 ; j < skill_trees[i].length() ; j++){
for(int k = 0 ; k < skill.length() ; k++){
@SiwonLim
SiwonLim / ํ’€์ด2.cpp
Last active April 16, 2020 08:21
ํ’€์ด2.cpp
#include <string>
#include <vector>
#include<iostream>
using namespace std;
int solution(string skill, vector<string> skill_trees) {
int answer = 0;
for (int i = 0; i < skill_trees.size(); i++) {
vector<char> compare;
@SiwonLim
SiwonLim / ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค_์Šคํ‚ฌํŠธ๋ฆฌ.cpp
Created April 16, 2020 08:18
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค_์Šคํ‚ฌํŠธ๋ฆฌ.cpp
#include <iostream>
#include <vector>
#include <string>
#include <map>
using namespace std;
map<char, int> m;
vector<int> origin;
int solution(string skill, vector<string> skill_trees) {
@SiwonLim
SiwonLim / ์™•์ดˆ๋ณด๋ฅผ ์œ„ํ•œ ๋””๋ชจ์˜ ๊ฐ€์žฅ ์‰ฌ์šด ์ฝ”ํ‹€๋ฆฐ Kotlin ๊ฐ•์ขŒ_2.kt
Created December 28, 2019 09:25
์™•์ดˆ๋ณด๋ฅผ ์œ„ํ•œ ๋””๋ชจ์˜ ๊ฐ€์žฅ ์‰ฌ์šด ์ฝ”ํ‹€๋ฆฐ Kotlin ๊ฐ•์ขŒ_2.kt
/* #2 ๋ณ€์ˆ˜์™€ ์ž๋ฃŒํ˜•
* var : ์ผ๋ฐ˜์ ์œผ๋กœ ํ†ต์šฉ, ์–ธ์ œ๋“ ์ง€ ์ฝ๊ธฐ ์“ฐ๊ธฐ๊ฐ€ ๊ฐ€๋Šฅ
* val : ์„ ์–ธ์‹œ์—๋งŒ ์ดˆ๊ธฐํ™” ๊ฐ€๋Šฅ. ์ค‘๊ฐ„์— ๊ฐ’ ๋ณ€๊ฒฝX(const?)
*
* Property(์†์„ฑ) : ํด๋ž˜์Šค์— ์„ ์–ธ๋œ ๋ณ€์ˆ˜
* Local Variable(๋กœ์ปฌ๋ณ€์ˆ˜) : Scope๋‚ด์— ์„ ์–ธ๋œ ๋ณ€์ˆ˜
*
* ์ฝ”ํ‹€๋ฆฐ์€ null์„ ํ—ˆ์šฉํ•˜์ง€ ์•Š์œผ๋‚˜ nullable๋ณ€์ˆ˜ ์‚ฌ์šฉ๊ฐ€๋Šฅ
* nullable๋ณ€์ˆ˜ ์„ ์–ธ ์˜ˆ : var a:Int? = null
*
@SiwonLim
SiwonLim / Retrofit2_example.java
Created December 16, 2019 08:28
Retrofit2_example.java
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
OkHttpClient ok_client = new OkHttpClient.Builder().addInterceptor(interceptor).build();
Retrofit builder = new Retrofit.Builder()
.baseUrl(IP) // ์ ‘์†ํ•˜๋ ค๋Š” IP
.addConverterFactory(GsonConverterFactory.create())
.client(ok_client)
.build();
@SiwonLim
SiwonLim / ๋ฐฑ์ค€_11657_ํƒ€์ž„๋จธ์‹ .cpp
Last active December 18, 2019 09:01
๋ฐฑ์ค€_11657_ํƒ€์ž„๋จธ์‹ .cpp
#include <iostream>
#include <vector>
#include <cstring>
#define MAX 502
#define INF 999999999
using namespace std;
vector<pair<int, int>> path[MAX];
int dist[MAX];
int main() {
int N, M;
@SiwonLim
SiwonLim / ๋ฐฑ์ค€_1948_์ž„๊ณ„๊ฒฝ๋กœ.cpp
Created December 11, 2019 05:29
๋ฐฑ์ค€_1948_์ž„๊ณ„๊ฒฝ๋กœ.cpp
#include <iostream>
#include <queue>
#include <vector>
#include <algorithm>
#include <cstring>
#define MAX 10001
using namespace std;
bool visited[MAX][MAX];
int dp[MAX], degree[MAX];
vector<pair<int,int>> startToEnd[MAX], endToStart[MAX];