|
|
back to boardPlease give some test. I get WA 7-8. Posted by Lifanov 20 Mar 2005 10:12 Time is different? for(i=0;i<400000;i++){ //for each sec if(m!=0.0 && i!=0){ dt=((100.0-T)*C*m)/P; if(dt>1.0) dt=0.0; T+=P*1.0/(C*m); // dt=0.0; } if(fabs(T-100.0)<0.0000001 || T>100.0){ //zakipel j=(int)(m/200.0); out(i,j); if(MWait<=1000.0){ if(MWait==0.0){ m=0.0; T=20.0; } else{ m=MWait; MWait=0.0; T=20.0; T+=P*dt/(C*m); } } else{ m=1000.0; MWait-=1000.0; T=20.0; T+=(P*dt)/(C*m); }
} if(time[i]==1){//add new people if(m==1000.0){ MWait+=200.0; }else{ // printf("Dolili "); // out(i,1); T=(m*T+4000.0)/(m+200.0); m+=200.0; } } Sorry for my English. |
|
|