Skip to content

Instantly share code, notes, and snippets.

#include<bits/stdc++.h>
#ifdef __SIZEOF_INT128__
typedef __uint128_t ulll;typedef __int128_t lll;
#define Fr128 I Fr&OP,(lll&x){RX;if(f)x=-x;RT}I OP lll(){lll x;TR}I Fr&OP,(ulll&x){RU;RT}I OP ulll(){ulll x;TR}
#define Fw128 I Fw&OP,(lll x){WI(39,ulll);RT}I Fw&OP,(ulll x){WU(39);RT}
#else
#define Fr128
#define Fw128
#endif
#define xx first
@mcfx
mcfx / suspend_gta5.cpp
Created January 4, 2022 13:05
Suspend gta5 without resource monitor
#include <cstdio>
#include <cstring>
#include <tlhelp32.h>
#include <windows.h>
int getpid(const char *pname) {
int pid = -1;
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (hSnapshot) {
PROCESSENTRY32 pe32;
import os
A = 'path_1'
B = 'path_2'
def walk(s):
for x in sorted(set(os.listdir(A + s)) | set(os.listdir(B + s))):
A_exist = os.path.exists(A + s + x)
B_exist = os.path.exists(B + s + x)
@mcfx
mcfx / 114514.py
Created November 12, 2020 15:36
数 字 论 证 器
def cal(s):
s = s.replace('/', '//')
try:
return eval(s)
except:
return None
def getx(a, b): # 直接用 ~- 或者 -~ 把 a 变成 b
va = cal(a)