版本比较
暑期停课 - 第二次 CSP 模拟赛小结
正文
增加 74 行删除 2 行
4 行未改动567891011121314597 行未改动全部展开61261361461561661761861962048 行未改动4 行未改动挂分:$\color{CornflowerBlue}{\textrm{0pts}}$。意想不到的得分:$\color{CornflowerBlue}{\textrm{0pts}}$。排名:多级机房 $\color{Gray}{5/23}$。没输。## 比赛过程梗概这次比赛前,我了解到前一个小时不动键盘在 $4$ 题赛中的发挥问题。597 行未改动全部展开::::::success[T4]```cpp line-numbers```:::## 赛场亮点48 行未改动4 行未改动5678910111213141516597 行未改动全部展开61461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169248 行未改动4 行未改动挂分:$\color{CornflowerBlue}{\textrm{0pts}}$。意想不到的得分:$\color{CornflowerBlue}{\textrm{0pts}}$。排名:$\color{Gray}{5/23}$。没输。## 比赛过程梗概这次比赛前,我了解到前一个小时不动键盘在 $4$ 题赛中的发挥问题。597 行未改动全部展开::::::success[T4]```cpp line-numbers#include<cstdio>#define ll long longnamespace FastIO{char ch;inline char gc(){static char buf[1<<18],*p1=buf,*p2=buf;if(p1==p2) {p2=(p1=buf)+fread(buf,1,1<<18,stdin);if(p1==p2) return EOF;}return *p1++;}inline void exgc(char &x){do x=gc();while(x==' ' or x=='\n');}template<typename _Tp>inline void read(_Tp &x){x=0;while((ch=gc())<48);do x=(x<<3)+(x<<1)+(ch^48);while((ch=gc())>47);}template<typename _Tp>inline void write(_Tp x){if(x>9) write(x/10);putchar(x%10+48);}template<typename _Tp>inline void readneg(_Tp &x){bool f=0; x=0;do if(ch=='-') f=1;while((ch=gc())<48);do x=(x<<3)+(x<<1)+(ch^48);while((ch=gc())>47);if(f) x=-x;}template<typename _Tp>inline void writeneg(_Tp x){if(x<0) putchar('-'), x=-x;write(x);}}using namespace FastIO;ll n,m;int p,q,r[11],s[11],cnt[11];void dfs(ll dp0,ll dp1){if(dp0+dp1>m or dp0>n) return;ll f0=dp0%p, f1=dp1%p;cnt[1]+=(f0==r[1] and f1==s[1]);cnt[2]+=(f0==r[2] and f1==s[2]);cnt[3]+=(f0==r[3] and f1==s[3]);cnt[4]+=(f0==r[4] and f1==s[4]);cnt[5]+=(f0==r[5] and f1==s[5]);cnt[6]+=(f0==r[6] and f1==s[6]);cnt[7]+=(f0==r[7] and f1==s[7]);cnt[8]+=(f0==r[8] and f1==s[8]);cnt[9]+=(f0==r[9] and f1==s[9]);cnt[10]+=(f0==r[10] and f1==s[10]);dfs(dp0+dp1,dp0), dfs(dp0+dp1,3*dp0+2*dp1);return;}int main(){freopen("finger.in","r",stdin);freopen("finger.out","w",stdout);read(n), read(m), read(p), read(q);for(int i=1; i<=q; i++) read(r[i]), read(s[i]), s[i]-=r[i], s[i]+=(s[i]<0)?p:0;dfs(1,0);for(int i=1; i<=q; i++) write(cnt[i]), putchar('\n');return 0;}```:::## 赛场亮点48 行未改动