NOIP&CSP 考前 Dev-cpp 的选项问题和考试心态

(进入考场后您将获得一个崭新的 \(Dev-cpp\)没有中文没有编译选项没有缺省源;我还将获得一个崭新的脑子,没有心态没有智商没有调试能力……)

中文

\[Step1
\]

\[Step2
\]

\[Step3
\]

编译选项

虽然考试现在兹磁 \(c++14\),但 \(Dev\) 只有 \(c++11\) QwQ。

缺省源

本作者不认为你能在考前写完这样的缺省源:

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define lll __int128
#define pb emplace_back
#define pob pop_back
#define mem(x,y) memset(x,y,sizeof(x))
#define Debug cerr<<"Passed line #"<<__LINE__<<" in function ["<<__FUNCTION__<<"].\n"
#define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define For(i,j,k) for(register int i=j;i<=k;i++)
#define Rof(i,j,k) for(register int i=j;i>=k;i--)
#define ckmx(a,b) if(a<b){a=b;}
#define ckmn(a,b) if(a>b){a=b;}
#define linf 0x3f3f3f3f3f3f3f3f
#define inf 0x3f3f3f3f
//#define endl '\n'
//switches
#define Freopen	0
#define Random	0
#define FastIO	0
#define Mod		0
#define Pair	0
#if Freopen
	#define Fin(s) freopen(s,"r",stdin)
	#define Fout(s) freopen(s,"w",stdout)
	#define File(s) Fin(s".in");Fout(s".out")
#endif
#if Random
	#define uid(i,j,k) uniform_int_distribution<ll> i(j,k)
	#define Rand(s) s(rand_num)
	unsigned seed=chrono::system_clock::now().time_since_epoch().count();//the value is the number of seconds from 1970/1/1 8:00 to the present multiplied by 1e9
	mt19937 rand_num(seed);//large random number
#endif
#if FastIO
	#define gc getchar
	#define pc putchar
	template<typename T> void read(T &x){
		x=0;char c=gc();bool f=0;
		while(!isdigit(c)){if(c=='-')f=1;c=gc();}
		while(isdigit(c)){x=(x<<3)+(x<<1)+c-48;c=gc();}
		if(f)x=-x;
	}
	template<typename T,typename... Args> void read(T &first,Args& ... args){
		read(first);read(args...);
	}
	template<typename T> void write(T x){
		if(x<0){pc('-');x=-x;}
		if(x>9)write(x/10);
		pc(x%10+'0');
	}
	template<typename T,typename... Args> void write(T first,Args ... args){
		write(first);pc(' ');write(args...);
	}
	void pt(string x){
		for(char i:x) pc(i);
	}
#endif
#if Mod
	const ll mod=1000000007;//do not exceed int_max
	inline ll pw(ll x,ll y){
		ll r=1;
	    while(y){
	        if(y&1) r=r*x%mod;
	        x=x*x%mod;
	        y>>=1;
	    }
	    return r;
	}
	#define madd(a,b) {a=((a+b)%mod+mod)%mod;}
	#define mmul(a,b) {a=(a*b%mod+mod)%mod;}
	#define inv(a) pw(a,mod-2)
#endif
#if Pair
	#define fir first
	#define sec second
	#define mkp make_pair
	#define pii pair<int,int>
	#define pil pair<int,long long>
	#define pli pair<long long,int>
	#define pll pair<long long,long long>
	template<class T1,class T2>
	inline const pair<T1,T2> operator+(const pair<T1,T2> &x,const pair<T1,T2> &y){
		pair<T1,T2> z;
		z.first=x.first+y.first;
		z.second=x.second+y.second;
		return z;
	}
	template<class T1,class T2>
	inline const pair<T1,T2> operator-(const pair<T1,T2> &x,const pair<T1,T2> &y){
		pair<T1,T2> z;
		z.first=x.first-y.first;
		z.second=x.second-y.second;
		return z;
	}
#endif
/*--------------------------very unglamorous header file dividing line--------------------------*/



signed main(){

    return 0;
}

所以缺省源写成这样差不多了:

#include<bits/stdc++.h>
#define ll long long
using namespace std;

signed main(){

	return 0;
}

心态

1. 记住一句话:全场我最强(自我安慰)。

2. 题目不会别紧张(Ta 难我难大家难,Ta 易我易拼仔细)。

3. 不要小瞧暴力分。

4. 题意不清别瞎猜(盲猜即错),读清题意再做题(磨刀不误砍柴工)。

5. 注意细节:变量类型,初始化,数组大小等( BMH 校训:把细小的事情做到极致就是成功)。

6. 留一点时间检查文件,别在最后孤注一掷。

智商

别慌即可。

冷静即可。

跳出格局即可。

不要怀疑你的智商。

调试能力

这里不建议使用 \(Dev\) 自带的 \(Debug\)(所以调成 \(Release\) 就行),建议手动输出调试。

实用的代码:

#define Debug cerr<<"Passed line #"<<__LINE__<<" in function ["<<__FUNCTION__<<"].\n"

实战:

编译选项

可以防一些特低级错误。

祝大家 \(\Large{RP++}\)

Tags: