mathturbator's blog

By mathturbator, history, 8 years ago, In English

Hello, Codeforces community!

Introducing HackerEarth Code Monk, contest for which is later today. The problems will be based on the basics of computer science concepts. Every week, we will release the tutorials, on which the Code Monk challenge will be based on.

OPENS AT:Feb 08, 09:00 PM IST.

CLOSES ON:Feb 09, 12:00 AM IST.

The link to the tutorial: https://www.hackerearth.com/practice/data-structures/trees/heapspriority-queues/tutorial/

The link to the contest: https://www.hackerearth.com/challenge/competitive/code-monk-heaps-and-priority-queues-1/

belowthebelt, prat33k, r3gz3n, MazzForces and trytolearn have contributed towards the making of the contest, creating problems, testing them and writing editorials and with the general feedback and management of the contest. They've worked extremely hard on making this contest a unique learning experience for people who want to learn the concepts of heaps and understand its working and structure.

The problem set consists of 5 algorithmic tasks with partial solutions allowed — you get points for every test that your solution passes. Also, top 3 newbie winners to get HackerEarth T-shirts in each Code Monk challenge!

Good luck to everyone, and have fun! :)

UPD:

Winners of Code Monk (Heaps and Priority Queues) are:

1) Gvs Akhil

2) Umang Upadhyay

3) Vaibhav Bansal

Congrats to all the winners. :D

Full text and comments »

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

By mathturbator, history, 9 years ago, In English

These are links to my 2 submissions: 1) http://mirror.codeforces.com/contest/588/submission/13653807 2) http://mirror.codeforces.com/contest/588/submission/13653815

Only difference between both is that in 1) am using scanf to take input while in 2) am using cin. Although my logic remains the same, I got TLE and possible penalty (if this had happened during contest). Just because I used cin, does it make my submission wrong? If not, should time limits be set such that solutions are not rejected on usage of cin?

Full text and comments »

  • Vote: I like it
  • -22
  • Vote: I do not like it

By mathturbator, history, 9 years ago, In English

I have tested it against small test cases and all boundary cases but am still not able to find what the error is. Can somebody please guide/help me. Here is the link to my submission. Thanks in advance :)

http://mirror.codeforces.com/contest/552/submission/11695423

Full text and comments »

  • Vote: I like it
  • -6
  • Vote: I do not like it

By mathturbator, 10 years ago, In English

I am trying to use to_string() function, which as of C++11 exists. I tried compiling it with GNU C++11 but it still gives me compilation error stating "to_string() wasnt declared in this scope". Do I need to choose other version of compiler or to_string() supporting compiler is not yet introduced for OJ?

http://mirror.codeforces.com/contest/264/submission/10534963

Full text and comments »

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

By mathturbator, 10 years ago, In English

I took part in Codeforces Round 297 (div2) and my solution was judged as "wrong answer on pretest 1". After contest was over I tried to check what was the error but I found that my output and expected output were same but still judged as wrong answer. Can someone tell me why?

http://mirror.codeforces.com/contest/525/submission/10468918

Full text and comments »

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

By mathturbator, 10 years ago, In English

Hi,

I dont know whom to send my query regarding this contest, so am just posting it here thinking i will get an explanation. I gave div2 contest today ( contest 284 ), and for problem C ( Crazy Town ), I made multiple submissions just because of a mistake that i think is because of the compiler. { if (val1>0 and val2<0) ans++; if (val2>0 and val1<0) ans++;

// if(val1>0 and val2<0) // ans++; // else if(val1<0 and val2>0) // ans++; } Here val1 and val2 are the values for two different points inserted in one single equation of line. Basically for checking if they lie on opposite or same side of line.

Can you please tell me if there is any difference between commented conditions and uncommented conditions, because if there is not, my solution was judged wrong because of this. You can also refer to my submissions for confirmation. I can see no value for val1 and val2 for which both if conditions would ever be true simultaneously. Also in my first submission you will find val1>=0 which should still work since val1 or val2 can never be zero according to problem constraints.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it