Skip to content

Instantly share code, notes, and snippets.

View Mjkim-Programming's full-sized avatar
💭
School

Kim min-jae Mjkim-Programming

💭
School
  • (South) Korea
  • 21:16 (UTC +09:00)
View GitHub Profile
#include <bits/stdc++.h>
#define ll long long
#define FASTIO \
cin.tie(NULL); \
ios::sync_with_stdio(false);
#define END return 0;
#define out cout <<
#define in cin >>
#define i128 __int128
#define ui64 uint64_t
@Mjkim-Programming
Mjkim-Programming / i128.cpp
Created December 22, 2025 07:03
__in128 template
#include <bits/stdc++.h>
#define ll long long
#define FASTIO \
cin.tie(NULL); \
ios::sync_with_stdio(false);
#define END return 0;
#define out cout <<
#define in cin >>
#define i128 __int128
using namespace std;
@Mjkim-Programming
Mjkim-Programming / poly.cpp
Created December 22, 2025 06:45
Area of polygon
double area(vector<int>& x, vector<int>& y) {
int N = x.size();
ll mulx = 0LL; ll muly = 0LL;
for(int i = 0; i < N; i++) {
mulx += (ll)x[i] * y[(i+1) % N];
}
for(int i = 0; i < N; i++) {
muly += (ll)x[(i+1) % N] * y[i];
}
return 0.5 * llabs(mulx - muly);
@Mjkim-Programming
Mjkim-Programming / gt.cpp
Last active December 21, 2025 08:58
Complete Graph Template
#include <bits/stdc++.h>
#define ll long long
#define FASTIO \
cin.tie(NULL); \
ios::sync_with_stdio(false);
#define END return 0;
#define out cout <<
#define in cin >>
using namespace std;
@Mjkim-Programming
Mjkim-Programming / scc.cpp
Last active December 21, 2025 02:39
SCC template using tarjan
#include <bits/stdc++.h>
#define ll long long
#define FASTIO \
cin.tie(NULL); \
ios::sync_with_stdio(false);
#define END return 0;
#define out cout <<
#define in cin >>
using namespace std;
@Mjkim-Programming
Mjkim-Programming / completesegtree.cpp
Last active December 20, 2025 13:57
Complete Segment Tree Template
#include <bits/stdc++.h>
#define ll long long
#define FASTIO \
cin.tie(NULL); \
ios::sync_with_stdio(false);
#define END return 0;
#define out cout <<
#define in cin >>
using namespace std;
@Mjkim-Programming
Mjkim-Programming / basic34702.cpp
Last active December 22, 2025 06:51
Basic code for BOJ 34702
#include <bits/stdc++.h>
#define ll long long
#define FASTIO \
cin.tie(NULL); \
ios::sync_with_stdio(false);
#define END return 0;
#define out cout <<
#define in cin >>
using namespace std;
@Mjkim-Programming
Mjkim-Programming / something.py
Last active November 24, 2025 06:57
Something About Calculating Stuff I dont know why I created this
from enum import Enum
class Operation(Enum):
EXIT = 0
ADD = 1
SUBTRACT = 2
MULTIPLY = 3
DIVIDE = 4
REMAINDER = 5
QUOTIENT = 6
@Mjkim-Programming
Mjkim-Programming / convexhull.cpp
Created November 9, 2025 03:19
Graham Scan Algorithm Implementation
#include <bits/stdc++.h>
using namespace std;
// [Copy Start]
struct Point {
long long x, y;
};
enum Orientation { CW = -1, COLLINEAR = 0, CCW = 1 };
@Mjkim-Programming
Mjkim-Programming / ccw.cpp
Created November 9, 2025 03:03
CCW Algorithm Implementation
#include <bits/stdc++.h>
using namespace std;
// [COPY START]
struct Point {
long long x, y;
};
enum Orientation { CW = -1, COLLINEAR = 0, CCW = 1 };