Alexander's blog

By Alexander, 12 years ago, translation, In English

Hello World.

 The next Codeforces round is prepared by me. This is my debut in arranging contests. I invite everyone to participate in the second division. I hope that all goes well. I wish you have a nice time and be able to improve your skills in programming.

 Thanks to Artem Rakhov (RAD), and Mike Mirzayanov (MikeMirzayanov) for preparation of the round and for motivation.

 Good luck and high rating!

  • Vote: I like it
  • +96
  • Vote: I do not like it

| Write comment?
12 years ago, # |
  Vote: I like it +10 Vote: I do not like it
Nice to see a division 2 participant writing problems for division 2.
Nice move by admins. and encouragement too!! :D
  • 12 years ago, # ^ |
    Rev. 2   Vote: I like it +1 Vote: I do not like it

    yh. This would inspire others to write good problems for contest. Really looking forward for this contest. :)

    • 12 years ago, # ^ |
        Vote: I like it +2 Vote: I do not like it
      really nice problem set. And it will encourage all. Nice move.

      And many many thanks to Alexander for this kind of beautiful problem set. :)
12 years ago, # |
Rev. 2   Vote: I like it -7 Vote: I do not like it

I've just noticed that no div-1 round today :(.

12 years ago, # |
  Vote: I like it 0 Vote: I do not like it
Will the competition be rated for out-of-competition participants?
12 years ago, # |
  Vote: I like it +19 Vote: I do not like it
Thanks for the problems Alexander, they were very nice! :)
  • 12 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    Рад что понравилось. Для меня был бесценный опыт и несколько философских размышлений.
    • 12 years ago, # ^ |
        Vote: I like it +18 Vote: I do not like it
      Some Egyptions do not understand russian, you know...
      • 12 years ago, # ^ |
          Vote: I like it +12 Vote: I do not like it
        Never mind, Google Translate was helpful. :)
        • 12 years ago, # ^ |
            Vote: I like it +5 Vote: I do not like it
          I-m sorry, I have week english skills and write English very slow.((
12 years ago, # |
  Vote: I like it -6 Vote: I do not like it
Stringy contest. :)
12 years ago, # |
Rev. 2   Vote: I like it +18 Vote: I do not like it

It is naughty to let letter 'Y' be a vowel and not included in the pretest :)
  • 12 years ago, # ^ |
      Vote: I like it +19 Vote: I do not like it
    also 'i' wasn't in pretest :-) in some code i seen this (not exactly this code, but it's about the bug):

    for(int i = 0; i < n; i++) {
    if(str[i] == 'a' || str[i] == 'A' || ... || str[i] == 'I' || str[i] == i)
    }

    There were all the vowels, but notice the 'i' vs i :-)

    Nice contest, thanks problemsetter!
12 years ago, # |
  Vote: I like it -7 Vote: I do not like it
The constarints for problem B were so small that one could just print the pattern (only 8 patterns are there in 2-9).Made it the easiest problem
  • 12 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it
    One dude in my room did the same, and got hacked. It isn't that easy copy pasting so much of the output into the code, and not getting anything wrong. ;)
  • 12 years ago, # ^ |
    Rev. 2   Vote: I like it +13 Vote: I do not like it

    If you "precompute" the patterns by hand, then you will waste a lot of time.
    If you "precompute" the patterns by an algorithm, then the best thing to do is to send the algorithm, not the patterns.

    The best (surely, the fastest) way to solve that problem is to generate patterns by an algorithm.

    ..And as Shuaib said, that way is also the safest!
12 years ago, # |
  Vote: I like it +3 Vote: I do not like it
i just learned to read the most obvious facts as well ..... LoL
12 years ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it


12 years ago, # |
  Vote: I like it +16 Vote: I do not like it
AEIOU......Y
12 years ago, # |
Rev. 4   Vote: I like it -13 Vote: I do not like it

Why I can't hack pedromnasc solution of A in CF #89 room #38. In his solution he takes max array size only 110. But in answer, the array size is 198. How it gives correct answer????
It must not print more than 110 char.But it does.. HOW????
Here is  pedromnasc's. code. http://codeforces.com/contest/118/submission/741727

My input string is "CCCCCCCCCCDDDDDDDDDDQQQQQQQQQQZZZZZZZZZZLLLLLLLLLLPPPPPPPPPPbbbbbbbbbbbbbbbbbbbbggggggggggttttttttt"
Which has 99 char.
And his solution is
".c.c.c.c.c.c.c.c.c.c.d.d.d.d.d.d.d.d.d.d.q.q.q.q.q.q.q.q.q.q.z.z.z.z.z.z.z.z.z.z.l.l.l.l.l.l.l.l.l.l.p.p.p.p.p.p.p.p.p.p.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.g.g.g.g.g.g.g.g.g.g.t.t.t.t.t.t.t.t.t"
Which is correct. :O How??
It's length is 198, which is grater than his "aux" array size. How it obtain the "EXTRA" char (110 to 198)th char in aux[110]?? :O

I also resubmit my code only for the array size.

My question is.......
Does array size matter in CF compiler ????????

  • 12 years ago, # ^ |
      Vote: I like it +6 Vote: I do not like it
    The OS allocates memory in whole pages, usually of size 4 KB. The memory past this buffer happened to be in the same page (or another mapped page with the same permissions), and so was writable too. Perhaps the program overwrote another static variable(s), or the space could just have been unallocated by the program. Either way you can see that it worked.
12 years ago, # |
Rev. 7   Vote: I like it +1 Vote: I do not like it

Thanks andreyv ...It was unknown to me.

It gives me a good lesson also..   :)

12 years ago, # |
Rev. 3   Vote: I like it +9 Vote: I do not like it

In today's problem C, I wrote my code quickly and believed it to be right, then I submit it with G++, and it returns an "Runtime Error"

Like this:

http://codeforces.com/contest/118/submission/742856

And after some minutes, I resubmitted exactly the same code, but in MS C++

http://codeforces.com/contest/118/submission/743301

And I  passed the pretest and finally got Accepted....

Why this strange thing happens?


UPD:  I tried my two problems in "Custum Test", using the test

45 32
293440596342887581257444442930778730382520372

and still RE in G++, and AC in C++, isn't it a bug in G++ 4.6?

  • 12 years ago, # ^ |
      Vote: I like it +11 Vote: I do not like it
    Apparently your "cmp" function is against requirements for std::sort.
    If num[x] and num[y] are both equal to 0, it will always return true.
    Thus for some x and y:  cmp(x, y) && cmp(y, x) is true (which semantically means (x<y)&&(y<x)). Likely g++ compiler checks that and yields runtime error if it detects inconsistency like that.
12 years ago, # |
  Vote: I like it 0 Vote: I do not like it
7 out of the top 10 are new unrated coders...good to see that the competition is only increasing ...
12 years ago, # |
  Vote: I like it +1 Vote: I do not like it
great round :)
12 years ago, # |
Rev. 2   Vote: I like it +11 Vote: I do not like it

I really like the problem set.  Alexander does a great work. Nice description and finally fine problem set with logically good concept.

12 years ago, # |
  Vote: I like it +1 Vote: I do not like it
Really nice problem set thanks for this nice contest :)
12 years ago, # |
  Vote: I like it +1 Vote: I do not like it
Waiting eagerly for the editorials ....
12 years ago, # |
  Vote: I like it +27 Vote: I do not like it
- What is the number of rated participants on Codeforces?
- It's... OVER NINE THOUSANDS!
- WHAT? OVER NINE THOUSANDS!?
12 years ago, # |
  Vote: I like it 0 Vote: I do not like it
Someone please give us Idea of solving problem C. 
12 years ago, # |
  Vote: I like it +7 Vote: I do not like it
It was a nice contest as DIV 2 contest. I wasted all the time in C where I needed to try for D. :(

Thanks to Alexander, RAD and Mike Mirzayanov for such contest. 
12 years ago, # |
  Vote: I like it 0 Vote: I do not like it
  Thanks to  Alexander'DIV2. I have a question about submit. My first submit is skipped.Why?
12 years ago, # |
  Vote: I like it +1 Vote: I do not like it
can't wait for the editorial to see the E Algorithm .. 
if someone can tell me it ... this will be highly appreciated :D