|
|
back to boardWA #9 Posted by Stankov 13 Mar 2010 15:21 I have Wa #9 please give some tests Re: WA #9 Try to find minimum amount of peoples with complexity o(1) like that: if ((m * d1) % d2 == 0) { b = (m * d1) / d2; } else { b = (m * d1) / d2 + 1; } Edited by author 26.04.2010 19:58 Re: WA #9 i've changed for(int j=1; j<=i; ++j) cout<<floor(fr)<<' '; for(int j=i+1; j<=d2; ++j) cout<<ceil(fr)<<' '; to for(int j=1; j<=i; ++j) cout<<fixed<<setprecision(0)<<floor(fr)<<' '; for(int j=i+1; j<=d2; ++j) cout<<fixed<<setprecision(0)<<ceil(fr)<<' '; Re: WA #9 Posted by Pavel 5 Jul 2021 02:03 try bigger numbers |
|
|