Skip to content

Instantly share code, notes, and snippets.

View q-kv's full-sized avatar
🤔
:thinking_face:

Beomgyu Kim q-kv

🤔
:thinking_face:
View GitHub Profile
@q-kv
q-kv / solarmagic
Last active September 28, 2019 22:26
___ ____ _ ____ ____ _ ____ _____ _ ___
/ __\/ _ \/ \ / _ \/ __\/ \__/|/ _ \/ __// \/ _\
| \| / \|| | | / \|| \/|| |\/||| / \|| | _| || /
\__ || \_/|| |_/\| |-||| /| | ||| |-||| |_//| || \_
\___/\____/\____/\_/ \|\_/\_\\_/ \|\_/ \|\____\\_/\___/
@q-kv
q-kv / pser.dev
Last active September 28, 2019 22:26
____ ____ _____ ____ ____ _____ _
/ __\/ ___\/ __// __\ / _ \/ __// \ |\
| \/|| \| \ | \/| | | \|| \ | | //
| __/\___ || /_ | /__| |_/|| /_ | \//
\_/ \____/\____\\_/\_\\/\____/\____\\__/
@q-kv
q-kv / C++ Single File.sublime-build
Last active July 18, 2020 06:23
My Sublime Settings
{
"shell_cmd": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c++",
"variants":
[
{
"name": "Run",
<snippet>
<content><![CDATA[
// from
// https://github.com/kth-competitive-programming/kactl/blob/master/content/geometry/Point.h
template<class T>
struct Point {
typedef Point P;
T x, y;
explicit Point(T x=0, T y=0) : x(x), y(y) {}
bool operator<(P p) const { return tie(x,y) < tie(p.x,p.y); }
#include <bits/stdc++.h>
using namespace std;
struct P {
int x, y;
};
vector<P> landmarks;
map<int, int> xmap, ymap;
int N, ans = 1;
#include <bits/stdc++.h>
using namespace std;
int a[1000000];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int N; cin >> N;
int mn = INT_MAX, mn2 = INT_MAX;
int xsum = 0;
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
ll a[1000007];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
ll n, k; cin >> n >> k;
@q-kv
q-kv / A.cc
Last active August 22, 2020 10:21
SCPC 2020 1 Round
#include <bits/stdc++.h>
using namespace std;
const int MAX = 20000;
int A[MAX], B[MAX];
void solve() {
int N, K; scanf("%d %d", &N, &K);
for (int i = 0; i < N; i++)
scanf("%d", A+i);
for (int i = 0; i < N; i++)
@q-kv
q-kv / B.cc
Created August 22, 2020 10:22
#include <bits/stdc++.h>
using namespace std;
int X[3001], Y[3001], N, K;
int xl[3001], yl[3001];
int xpsum[3001][3001], ypsum[3001][3001];
int getx(int i, int j) {
if (i < 0) return 0;
return xpsum[i][j];
}
@q-kv
q-kv / C.cc
Created August 22, 2020 10:23
#include <bits/stdc++.h>
using namespace std;
const int INF = 987654321;
int N, K;
queue<int> q[1500];
int ans[1500][1500];
void solve() {
int m;
scanf("%d %d %d", &N, &K, &m);