大事祭 / CSAcademy / 可视化 / 警钟撅烂 / 做题计划 / Tricks / 补题 / 参考资料
编译参数
g++ $1.cpp -o $1 -std=c++14 -O2 -static-libasan -Wall -Wextra -Wpedantic -Wconversion -Wshadow -Wfloat-equal -fsanitize=address,undefined,signed-integer-overflow,leak -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC或
-std=c++14 -O2 -static -Wall -Wextra -Wpedantic -Wconversion -Wshadow -Wfloat-equal缺省源
#include <bits/extc++.h>
using namespace std;
#define dbg(x) cerr << #x " = " << (x) << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define x first
#define y second
#define rep(x, y, z) for (auto x = (y); x <= (z); x++)
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
void init() {
#ifndef ONLINE_JUDGE
freopen("______.txt", "r", stdin);
#else
cin.tie(0)->ios::sync_with_stdio(0);
#endif
}
int main() { init(); }多测版
#include <bits/extc++.h>
using namespace std;
#define dbg(x) cerr << #x " = " << (x) << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define x first
#define y second
#define rep(x, y, z) for (auto x = (y); x <= (z); x++)
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
void solve() {
}
int main() {
#ifndef ONLINE_JUDGE
freopen("______.txt", "r", stdin);
#else
cin.tie(0)->ios::sync_with_stdio(0);
#endif
int t;
cin >> t;
while (t--) solve();
}卡时
chrono::steady_clock::now().time_since_epoch().count()限制
ulimit -v [内存限制(KB)] -s [内存限制(KB)] -t [时间限制(秒)]debug 宏
#define dbg(x) cerr << #x" = " << (x) << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)对拍
(((i = 0)))
while true;do
./gen
./BF
./my
if diff -BZ my.ans my.out; then
(((i = i + 1)))
echo AC $i
else
echo WA
exit 0
fi
done