#include #define mod 1000000007 using namespace std; /*hello stalker Any data or information stolen is copyright infringement. You will be reported.*/ long long int i,j,k,t,q,n,m,xm,ym,ii,jj,iii,jjj,row,col,fcost,nn,mm,co,fl; string s,s1,s2,s3; char c,c1; long long int fco,eo,oo,panga,cou,oj,ojv; map >> map1,map2,map3; mapmapp,mapp1[200005]; long long int y[200008],z[262149],yf[200007],zf[3000005],a[100002],x[100005][3],depth[200008]; set set1,set2; vector v[200009],vz,vv; vector> v1,v2,v3; double floa,flo; long long check[200008]; long long maxl(long long x,long long co) {check[x]=1; if(v[x].size()==1 && x!=0) {depth[x]=1; return 1; } for(long long i=0;ix ) { co=max(co,maxl(v[x][i],0)); } } depth[x]=1+co; return 1+co; } long long dfs(long long x,long long i) { check[x]=1; if(x!=0 && v[x].size()==1) { return y[x]; } for(long long oj=0;ojmapp[depth[v[x][oj]]]+3) {check[v[x][oj]]==1; y[x]=y[x]^mapp1[v[x][oj]][(i)%mapp[depth[v[x][oj]]]]; } else { y[x]=y[x]^dfs(v[x][oj],i);mapp1[x][i]=y[x]; } } } return y[x]; } int main() {ios::sync_with_stdio(false),cin.tie(0),cout.tie(0); cin>>n>>m>>ii>>co; fco=0; while(fcoii) { n=n-m; } else { n=ii; } if(fco<=co) { fl++; } } cout<