ENG  RUS Timus Online Judge
Online Judge
Problems
Authors
Online contests
Site news
Webboard
Problem set
Submit solution
Judge status
Guide
Register
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

## Discussion of Problem 1370. Magician

Posted by CHIDEMYAN SERGEY 13 Apr 2007 21:50
[code deleted]

Edited by author 16.04.2007 22:52
Re: I SEND SOLUTION 3 DIFFERENT WAYS AND ALL OF THEM CRASH!HERE IS ONE OF MY CODES!PLEASE, HELP!THANK!!!
Posted by CHIDEMYAN SERGEY 14 Apr 2007 21:00
MAY BE ANY ERROR IN ALGORITHM!
Re: I SEND SOLUTION 3 DIFFERENT WAYS AND ALL OF THEM CRASH!HERE IS ONE OF MY CODES!PLEASE, HELP!THANK!!!
Posted by Alias (Alexander Prudaev) 15 Apr 2007 21:01
DO NOT USE BIG LETTERS!
Re: I SEND SOLUTION 3 DIFFERENT WAYS AND ALL OF THEM CRASH!HERE IS ONE OF MY CODES!PLEASE, HELP!THANK!!!
Posted by CHIDEMYAN SERGEY 15 Apr 2007 21:05
AT FIRST IT ISN'T BIG,AT 2-ND DON'T SAY ME WHAT I MUST DO!
Re: PLEASE,HELP!!! THANK YOU VERY MUCH!!!
Posted by Alias (Alexander Prudaev) 15 Apr 2007 21:07
use % operation
Re: PLEASE,HELP!!! THANK YOU VERY MUCH!!!
Posted by CHIDEMYAN SERGEY 15 Apr 2007 21:08
THANK,I'LL THINK.
Re: PLEASE,HELP!!! THANK YOU VERY MUCH!!!
Posted by Alias (Alexander Prudaev) 15 Apr 2007 23:21
look, n = 1000, m = 32000

seq  = new __int64 [n]; // now seq is an array of 1000 int64
j = 0;
for (i = n-m; i < 10; i++) // this cycle will be executed 31000 times
printf("%I64d",seq[j++]) // and there will be acces vialation
because j <= 31000, but seq is array [0..999]

PS: it is very difficult to read text of your messages beacause of BIG LETTERS. I'ts really true.
I spent more then 8 hour in my chair and look at my comptuter's monitor.
my eyes very tired, but you don't listen in me.

Edited by author 15.04.2007 23:22
Re: PLEASE,HELP!!! THANK YOU VERY MUCH!!!
Posted by CHIDEMYAN SERGEY 16 Apr 2007 20:06
[deleted]

Edited by author 16.04.2007 22:53
Re: PLEASE,HELP!!! THANK YOU VERY MUCH!!!
Posted by Alias (Alexander Prudaev) 16 Apr 2007 20:31
3 4

4 3

5 1

you program don't work on these tests

and don't combine cout/cin with printf/scanf
Re: PLEASE,HELP!!! THANK YOU VERY MUCH!!!
Posted by CHIDEMYAN SERGEY 16 Apr 2007 21:12
Thank!!!but 11 ≤ n ≤ 1000!can n be <11?

Edited by author 16.04.2007 21:13

Edited by author 16.04.2007 21:16
Re: PLEASE,HELP!!! THANK YOU VERY MUCH!!!
Posted by Alias (Alexander Prudaev) 16 Apr 2007 22:05
oh, sorry. of course not. n>=11

try this
[ deleted]

Edited by author 16.04.2007 22:54
Re: PLEASE,HELP!!! THANK YOU VERY MUCH!!!
Posted by CHIDEMYAN SERGEY 16 Apr 2007 22:41
thank you very much for good idea!AC now!

Edited by author 16.04.2007 22:51