This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
# ν΅λ‘(κ°λ³ν) λ§μ€ν¬ μμ± | |
def build_mask(L_m=45.0, cell_size=0.333, w_min=3.2, w_max=4.0): | |
nx = int(round(L_m / cell_size)) | |
ny_max = int(round(4.2 / cell_size)) # μ΅λ ν 4.0m + μ¬μ | |
y_center = ny_max // 2 | |
x = np.arange(nx) | |
# μ€μ λ³λͺ©(κ°μ°μμ) λ°μ ν 곑μ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from pathlib import Path | |
import matplotlib | |
matplotlib.rcParams["font.family"] = "Malgun Gothic" # μλμ° κΈ°λ³Έ νκΈ ν°νΈ | |
matplotlib.rcParams["axes.unicode_minus"] = False # μμ λΆνΈ(β) κΉ¨μ§ λ°©μ§ | |
################################################################################ | |
# 1. κΈ°λ³Έ μ€μ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from copy import deepcopy | |
import time | |
t0 = time.perf_counter() | |
X = range(1, 8) | |
eq_x = (1, 2, 6) | |
dom = {i: set(X) for i in X} | |
inv = {v: set(X) for v in X} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
import pandas as pd | |
class SoccerBallTrajectory: | |
"""μΆκ΅¬κ³΅ κΆ€μ λΆμ ν΄λμ€""" | |
def __init__(self): | |
# 물리 μμ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <limits.h> | |
#define MAX 501 | |
int dp[MAX][MAX]; | |
int matrix[MAX][2]; | |
int min(int a, int b) { | |
return a < b ? a : b; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
#define MAX_OBSTACLES 100 | |
#define THRESHOLD 5.0 | |
#define GRID_STEP 2.0 | |
typedef struct { | |
double x, y; | |
} Point; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#define MAX 2000002 | |
#define MAX_ARCS MAX | |
#define INITIAL_CAPACITY 16 | |
typedef long long ll; | |
typedef struct { |