This file contains 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<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 |
This file contains 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 <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; |
This file contains 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 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) |
This file contains 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
def cal(s): | |
s = s.replace('/', '//') | |
try: | |
return eval(s) | |
except: | |
return None | |
def getx(a, b): # 直接用 ~- 或者 -~ 把 a 变成 b | |
va = cal(a) |