coders1122's blog

By coders1122, 11 years ago, In English
Well, I finally find time to write yet another blog post.

My first rated div2 match! :)
I really cannot comment my feelings after the match in one sentence.A blog post is surely the best way to express it.

Firstly, problem A.
I began coding in my default language C++ and used strings.I finish coding in less than 2 mins and answering coming for samples 1 and 2.
But, WA for sample 3.What the ****?

I check my code and a quick realisation why I fail.I have to make a quick decision about what to do next.
After struggling a little in dilemma, I move to Python.Less than 2 minutes into coding and I make a submit on A.Pretests Passed! Phew!
Now, I m like - "I need to get B fast!". One quick glance at the standings and the statistics are sky shooting.

I dont take into my head.Still calm and contained while reading B.After a quick read into a problem, I feel "Yes!I know this!" :-).
Again, few minutes into coding and hurray, another quick submit on B and same judgement - Pretests Passed.

Again I glance at the standings page and strangely I observe SO many submits on D.Initially i misread the problem and just feel the answer to be first N primes.
I submit it and then get a wrong answer on #1.
Im like - "This can't happen!!"
I again re read the question and I understand why I failed.

Not more than 5 minutes and I realise what is expected out of me.All what I coded is not a waste. Just a lil tweaking and I make a submit in C++. But here lies the greatest pitfall of today.
I initially find an overflow when i used long long int and then quickly changing to unsigned long long and the overflow disappears(atleast this is what I "thought").
I make a submit and Im floating at the top of my room.
I cant believe this is happening! :)

I decide I can make a nice performance this match.And move to C.
Man, this was possibly one of the "hard" C problems that ive solved.The idea isnt hard to get but the tricky part is to observe all the constraints and code clean.

A little tweaking after the regular coding and debugging into code and phew, answers coming!
Alarmingly, I make a quick submit and yipee, pretests passed!

Can't wait to move on to E.
But wait, Hacked on D.What the **** again??
I m halfway through E and 20 minutes left and I dunno what to do.Resubmit D or code E?

One of the smarter decisions I make today - Resubmit D! :)
After 5 minutes into looking back at the question, I realise what a big fool I am. Duh, obviously there will be an overflow!! What have I been thinking?? +.+(awed)

Anyways, I finish resubmitting D in python and I fall to 80s in the standings. :( .
I cant really concentrate trying to get E now and only 10 minutes left for contest completion.

A few thoughtful moments, but I really dont seem to get E.Maybe some other day for a full 5 submit! :(

Anyways, ending on a really high hopeful note that all my problems pass system tests,

Signing off,

P.S:Do leave your comments.
EDIT:Yayy!A new color!This adds one more to my codeforces history. :)

Read more »

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

By coders1122, 11 years ago, In English
Well, this would be my first blog post and I cant find a better event to start with than today's match.

I began the match thinking i'd regain my yellow spot and things seemed ok with problem A.
However, after a very quick submit on A, I had a pop up on my browser saying "Problem edited!". I instantly realised that i'd fail and made a quick resubmit. Lucky enough to have not locked it :D ! Sometimes, laziness helps :P !

I ended up starting B pretty slowly after reading the rather "long" statement twice atleast before I understood what it meant.After a good amount of coding and cooking up really "complicated" ideas for it, i made a submit. Just 30 minutes left for the contest to finish now! :|

One quick glance at the standings page told I were doing good till now. I went back to my room hacking solutions on edge cases in A.Lucky to have found 1 or 2 even after 2 hours into the contest.

10 minutes before the contest ending and guess what?? My solution to B gets hacked. I'm very sure about the idea and still its a "successful hacking attempt" :| !

After a treacherous 30 minutes of waiting, I register for practise and make a resubmit.
And undoubtedly so, I get "Accepted" :( !!

For the people, who've enthusiastically read till here, the bug i had in my code was rather funny and im sure the way i coded it made it easy for my challenger.

#define MAXL 100011
char s[MAXL]; // the word entered by user
//the above line is undoubtedly correct
char t[MAXL]; // a temporary array for holding the potential address

Although the last line seems ok at first glance, it fails with a runtime error on the judge for having misunderstood the problem statement.

Lesson Learnt: Being Careful is as much required in the contest as Coding Fast and Accurate! :(
All the best for the remaining matches, and wish you high new ratings! :)
Good day, folks!!

Read more »

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