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: