ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1255. Graveyard of the Cosa Nostra

My thoughts
Posted by Perov Rodion 17 Mar 2003 13:58
As I think if n > k then the solution is (n*n - 1) div k and that's
why the answer for 7 4 is 12
1  2  3  4  4  4  4
1  2  3  5  5  5  5
1  2  3  6  6  6  6
1  2  3     7  8  9
10 10 10 10 7  8  9
11 11 11 11 7  8  9
12 12 12 12 7  8  9
And when n < k then it's quite difficult => wait and bleed)))
look here Rodion
Posted by Aleksey S.S. 17 Mar 2003 14:06
> As I think if n > k then the solution is (n*n - 1) div k and that's
> why the answer for 7 4 is 12
> 1  2  3  4  4  4  4
> 1  2  3  5  5  5  5
> 1  2  3  6  6  6  6
> 1  2  3     7  8  9
> 10 10 10 10 7  8  9
> 11 11 11 11 7  8  9
> 12 12 12 12 7  8  9
> And when n < k then it's quite difficult => wait and bleed)))
Re: look here Rodion
Posted by BycovD 21 Mar 2003 01:19
> > As I think if n > k then the solution is (n*n - 1) div k and
that's
> > why the answer for 7 4 is 12
> > 1  2  3  4  4  4  4
> > 1  2  3  5  5  5  5
> > 1  2  3  6  6  6  6
> > 1  2  3     7  8  9
> > 10 10 10 10 7  8  9
> > 11 11 11 11 7  8  9
> > 12 12 12 12 7  8  9
> > And when n < k then it's quite difficult => wait and
bleed)))
What about (2, 1) or (4, 2) ???
Re: look here Rodion
Posted by Perov Rodion 24 Mar 2003 20:37
> > > As I think if n > k then the solution is (n*n - 1) div k and
> that's
> > > why the answer for 7 4 is 12
> > > 1  2  3  4  4  4  4
> > > 1  2  3  5  5  5  5
> > > 1  2  3  6  6  6  6
> > > 1  2  3     7  8  9
> > > 10 10 10 10 7  8  9
> > > 11 11 11 11 7  8  9
> > > 12 12 12 12 7  8  9
> > > And when n < k then it's quite difficult => wait and
> bleed)))
> What about (2, 1) or (4, 2) ???
&#1053;&#1077; &#1085;&#1091; &#1101;&#1090;&#1086; &#1087;&#1086;&#1085;&#1103;&#1090;&#1085;&#1086; &#1095;&#1090;&#1086; &#1077;&#1089;&#1083;&#1080; n &#1076;&#1077;&#1083;&#1080;&#1090;&#1089;&#1103; &#1085;&#1072; k &#1090;&#1086; &#1086;&#1090;&#1074;&#1077;&#1090; N*N div K- &#1103;
&#1087;&#1088;&#1086;&#1089;&#1090;&#1086; &#1085;&#1077; &#1091;&#1089;&#1087;&#1077;&#1083; &#1076;&#1086; &#1082;&#1086;&#1085;&#1094;&#1072; &#1085;&#1072;&#1073;&#1080;&#1090;&#1100; &#1072; &#1087;&#1086;&#1090;&#1086;&#1084; &#1083;&#1077;&#1085;&#1100; &#1087;&#1077;&#1088;&#1077;&#1076;&#1077;&#1083;&#1099;&#1074;&#1072;&#1090;&#1100; &#1073;&#1099;&#1083;&#1086;))