![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Tip
北屿小智障
喜欢有阳光的早晨
好像什么都可以重新再来。
展开
-
Tip_头文件
慎记开头文件 CE万年衰#include<cstdio>#include<algorithm>#include<cmath>#include<cstring>#include<queue>#include<vector>#include<windows.h>#include<map>#include<iomanip>#include<cctype>#include<iostrea原创 2015-11-03 21:19:46 · 478 阅读 · 0 评论 -
Tip_对拍
bat文件 生成.bat@echo off :loop data.exe //生成数据right.exe //stdtest.exe //测试数据fc right.out test.out if not errorlevel 1 goto looppausegoto loop C++版详讲对拍 对拍用于验证算法正确性,不保证运行时间!! 一般有四个文件 一个对拍文件 dp.原创 2015-11-05 21:04:35 · 752 阅读 · 0 评论 -
Tip_卡(qiǎ)时
头文件 time.h#include<ctime>#include<cstdio>int main(){ int a=0;clock_t cl=clock(); while(true){ a=a+1; if(clock()-cl>=0.9*CLOCKS_PER_SEC) break; } printf("a = %d time =原创 2016-02-03 15:35:03 · 387 阅读 · 0 评论 -
Tip_压位
头文件 bitset 自定义二进制尺寸233#include<bitset>#include<cstring>#include<cstdio>using namespace std;int m[1<<16];int calc(long long x){ int res=0; for(int i=0;i<16;i++){ if(x&1) res++;x>>=原创 2016-02-03 15:44:49 · 346 阅读 · 0 评论 -
Tip_高维寻址
assert() //停止程序 register //放入快速缓存器#include<cstdio>#include<ctime>#include<cassert>#include<iostream>using namespace std;#define N 200int a[N][N][N],b[N][N][N];int main(){ clock_t cl;cl=cloc原创 2016-02-03 15:53:06 · 248 阅读 · 0 评论 -
Tip_glibc的几个有用的处理二进制位的内置函数
原文链接 glibc的几个有用的处理二进制位的内置函数 — Built-in Function: int __builtin_ffs (unsigned int x)Returns one plus the index of the least significant 1-bit of x, or if x is zero, returns zero. 返回右起第一个‘1’的位置。— Buil转载 2016-03-15 20:03:51 · 388 阅读 · 0 评论 -
Tip_读入输出优化
char buf[MAXN],*ps=buf,*pe=ps+1;inline void rnext(){//读优 if(++ps==pe) pe=(ps=buf)+fread(buf,1,sizeof(buf),stdin);}inline int in(int x=0,char ch=getchar(),int v=1){ while(ch!='-'&&(ch原创 2016-03-05 21:50:01 · 536 阅读 · 0 评论