随笔分类 - 常用代码/博客
摘要:存个档吧。 正数读入: #include<iostream> #include<cstdio> #include<algorithm> #define il inline using namespace std; int a,b; char buf[1 << 23],*p1=buf,*p2=buf,
阅读全文
摘要:DevC++中 工具$\rightarrow$编译选项 在编译时加入以下指令处打上勾子 同时加入以下代码 -Wl,-stack=134217728 $134217728=12810241024$ 即$128MB$的空间。 附:C++11的命令同样加上 -std=c++11
阅读全文
摘要:\[ \sum_{i=1}^n i=\frac{n(n+1)}{2}\\ \sum_{i=1}^n i^2=\frac{n(n+1)(2n+1)}{6}\\ \sum_{i=1}^n i^3=\frac{n^2(n+1)^2}{4}\\ \sum_{i=1}^n i^4=\frac{n(n+1)(2
阅读全文
摘要:方法一:bat版本 建一个.bat文件 输入下面的代码(文件名自行修改,$make.exe$代表造数据文件,$1.exe,2.exe$表示相关要比较的程序) :loop make.exe 1.exe 2.exe fc 1.out 2.out /W if %errorlevel%==1 pause g
阅读全文
摘要:一般$NOIP$时栈空间与内存空间一样大,但是编译器一般只开有$8MB$的栈空间,以致递归过度会导致爆栈 所以我们可以再$vscode$终端中敲入ulimit -s X $X$为栈空间大小(例:$X=128000=125*1024$时,栈空间为$125MB$)
阅读全文
摘要:$Linux$对拍标准代码 #include<bits/stdc++.h> using namespace std; int main(){ int i; for (i=1;;i++){ printf("The result of No. %d Case is: ",i); system("./da
阅读全文
摘要:Luogu1177 【模板】快速排序 基数排序 一位一位进行排序,这里的板子中,$p$代表模数,可以自行选择 \(C++ Code:\) #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #define
阅读全文

浙公网安备 33010602011771号