Thursday, October 3, 2013

Adieu CodeVita2013..!!

The TCS Coding Contest concluded a midst great fanfare and enthusiasm in TCS Yantra Park Mumbai on 3-Sept-2013. CodeVita 2013 had three rounds of coding where students from institutes across India covering from 26 states, 250+ cities and 1200 plus colleges rush in their nominations. This year CodeVita allowed students to code in 7 different programming languages – C, C++, C#, Java, Perl, Python and Ruby. At the close of registrations, CodeVita had more than 1.3 Lakh individual registrations and 51,000 two member teams who confirmed their participation in Round 1 held on 13-August-2013 which in all submitted 60K submissions .Out of which 724 teams advanced to Round 2 and for Grand Finale lucky 10 team was able to pass all hurdles.

Team Coderoach from IIT Guwahati emerged as winners of this year’s CodeVita ,winning the prize of Rs 100,000 . Team CodeKing from Anil Neerukonda Institute of Technologiy, Vishakhapatnam won the 2nd prize an iPad while Team Kaushal – Dhwani from Charotar Institute of Technology won the 3rd Prize , samsung Tab3. Out of 6 finalist three were from final year and three were from third year of their engineering .

All  top ten teams won an Internship Offer with the TCS Research Labs and top three winning teams were given provisional employment offer too. Chief guest of Grand Finale, Mr. Ananth Krishnan,Vice President & Chief Technology Officer of TCS complimented participants' for their hard work, submissions and analytic abilities .

Fun facts of Codevita 2013

  •  From Round-1 60K submissions we got some interesting facts about language inclination of Indian students. The pie chart below will show number of submissions in Round-1 w.r.t languages in which they were submitted


            

By analyzing above figure we can say that C and Java are most loved language by Indian students. Out of three newly added language in this season, Python came as emerging language .

  • CodeVita  season II was a huge success by having more than 1.3Lakh individual registrations in its account. If we divide number of user on basis of Recruitment branch of TCS. Mumbai Region was winner which defeated last year winner Chennai.





Hope you all enjoyed this journey of Coding with us .It’s time for us to say bye to CodeVita2013.

 See you all again in CodeVita2014 with new spirit and fun !!



                                              Good Bye CodeVita2013..!!

Sunday, August 11, 2013

FAQs-CodeVita 2K13

FAQs-CodeVita 2K13

Submission FAQs

How are evaluations processed?
CodeVita platform has a automatic grader which does the evaluation.The grader knows how to evaluate in the 7 supported languages.There is no manual intervention in the evaluation process, hence, no subjective biases. The grader expects input and output in specific formats for it to perform evaluation. For this reason,it is critical that your submission adheres to the input-output formats mentioned in the question text.The grader is responsible for compiling , running a battery of testcases  against your solution and validating your output.Various different output status codes and status messages are explained in rest of the document.
  
What is Presentation Error?
Presentation Error means that your answer is correct. It just has more (or less) than required number of whitespaces as compared to a "Accepted" solution. Presentation Error is treated as on par with Accepted solution. It is advised to not spend time on getting a Presentation Error status converted to Accepted. Participants should move to the next unsolved question without further delay.

What does the "Almost there, think some more" status message convey?
It conveys that your submission is failing at least one of the test cases. You should work on figuring out what test case your program could be failing and work on fixing it.
 
I get a Time Limit Exceeded status message. I know I have to optimize it, but to what extent?
Different questions have a different maximum upper bounds on the allowed run-time. Hence a generic answer to this question of the form -"Your program should execute in less than 500 msec is not possible". As long as you continue to receive this status code you must understand that your program is exceeding the threshhold set as maximum allowed time for solving this problem. In such cases, you should typically re-think your algorithm used for solving the problem. If your solution uses a brute force approach try figuring out an optimal algorithm for the same. Once you submit solution with optimal algorithm, this error should go away. This is just one example of handling TLE. There could be more ways. Bottomline is you have to optimize and you have to set you own targets for optimization.

 I get a Memory Limit Exceeded status message. I know I have to reduce memory footprint of the program but by how much?
Different questions have a different maximum upper bounds on the allowed memory consumption. Hence a generic answer to this question of the form -"Your program should execute in less than 20 MB of memory is not possible". As long as you continue to receive this status code you must understand that memory consumption of your submitted code is more than allowed limits. Also, different languages have different memory limits for the same problem. So if you are proficient in more than one language, try re-writing code in another language.

Within how much time can I expect my submission to be graded?
This question is difficult to answer. When the system is lightly loaded you can expect your submissions to be graded in less than 30 seconds.However under peak loads, submissions get queued up for evaluation. Depending on the size of evaluation queue, response time can shoot up to a few minutes. At our end, we have done our due diligence and invested in adequate capacity to ensure that queue build-ups are minimal.

My submission never got evaluated. What went wrong?
Most likely cause of this is that your code uses a blocking function like for e.g. getch() in C. This type of blocks forever and prevents the grader from running properly. Likewise, other blocking calls in other languages have the same effect. These evaluations fail and the system simply swallows the failure (unix-style). Avoid blocking calls in your program.Other possibility is that there is a huge queue build-up on the grader and your submission is simply waiting in the queue.

My code compiles on my machine, the system shows my submission has Compile-Time Errors. How is this possible?
  • Firstly, ensure that you are using the same compiler that the CodeVita system is using. For e.g. do not use Turbo C and expect the code to be compiled on CodeVita systems which uses gcc.
  • Secondly, even if you are using the same compiler, check if you are using a version higher than what CodeVita system is using. For e.g if CodeVita system is using Oracle JDK 1.6 and you are using  Oracle JDK 1.7, its likely that your code may fail to compile because new features of 1.7 are not available in 1.6.
  • Finally, if you using same compiler of the same version that the CodeVita system is using, it is still possible to get a Compile Time Error.This is because CodeVita systems will use certain compilation flags which you may not have used in your system. In such cases, the Compile-time error message that CodeVita systems will depict should be carefully studied. If you pay enough attention to the error message, you should be able to figure out cause of CTE and then eliminate it.
Is one language recomended over other languages in CodeVita system?
No, you can submit solution in any 7 supported languages, depending on your preference. The right way to approach this is to figure out which language is most suited for a given problem type.
CodeVita systems will support all langauges for all questions. You should pick a language which is best suited for a given question for optimal results.
 
Can I switch languages in a attempting to solve same problem?
Yes, you can attempt solving the same question in more than one language. Your aim is to give optimize solution for a problem. Optimality order is
  • minimum time it takes to solve the given problem
  • efficiency - ie minimum system resource consumption.
 
What do you mean by "Both members are expected to solve problems"?
It simply means that team work is expected. If one team member is working on one problem, other should work on other problem to maximize chances of earning higher scores. Likewise, the working solution should be submitted through id of the member whose contribution is more in solving that problem. Submitting a solution for the same through both team members ids is niether expected nor required. Objective is to maximize team score without losing visibility into individual performances.
 
 
Contest FAQs

How long is the first round of CodeVita and what is my contest duration?
First round of CodeVita runs in a 24-hr window between 3 PM on 13th August to 3 PM on 14th Aug. Each team will get maximum of 6 hrs to solve the problems. The first round has a hard-stop at 3 PM on 14th August. In order to avail fill 6 hrs, teams should start their individual contests before 9 AM on 14th August.If a team starts its contest after 9 AM on 14th August, they will get time only upto 3 PM to solve the questions asked in the contest.

When does the contest start for a team and for an individual?
The contest starts for a team as soon as one member of the team starts the contest. This time plus 6 hrs, subject to 1) above, is the contest duration of the entire team. Ideally, both members of the team should begin the contest simultaneously for both members to get full 6 hrs. However for some reason, if one team member starts the contest earlier than his / her team mate, the contest end time even for the second member will be first user contest start time + 6 hrs.
 
e.g. A and B are team mates and their team is Team1.
  • If, A starts the contest at 3 PM, the contest end time for Team1 is 9 PM. It does not matter when B starts the contest.
  • Similarly, If B starts the contest at 3 PM, the contest end time for Team1 is 9 PM. It does not matter when A starts the contest.
  • Contest is started when the first member, either A or B, enters the Coding Arena.
 
Does seeing the Full Problem statement have any significance?
Yes, clicking on "View Full Problem" button starts the timer for that problem. This timer is maintained internally by the system and is not displayed unlike the contest timer. Again, like contest start, the first member's time of viewing the problem will be taken as the start time of that problem for that team. Problem start time has significance in Gamification. So every participant should be judicious in his / her approach before letting the timer start for that problem. Before clicking on the "View Full Problem", it is highly recommended to View stats for that problem. The stats for that problem shows a graph of solving probability over time for that problem. Lower the probability, tougher the question and vice-versa. Participants should make use of this fact to maximize their scores.
 
How is Ranking done?
Ranks are calculated per team only. Best submissions for each problem across both members are taken into consideration while assigning scores. To maximize scores, it is advised that individual members of team work on different problems. However, this is only a suggestion. Teams can collaborate in way they see fit in order to maximize their own chances.
 
I was ranked in Top N at the end of my contest time. Will my rank remain the same throughout?
No. Your rank may change. Ranks are calculated across entire duration of the contest. What you see at the end of your contest time is a point in time representation of your rank. This representation may change based on how people still participating in the contest are doing.
 
Why didnt I get my allotted quota of 6 hrs during the contest?
Refer fist two questions of this section.
 

Wednesday, August 7, 2013

CodeVita Process Pseudo-code

The CodeVita 2013 Process Pseudo-code


package energy.efficiency.effectiveness.tcscodevita

import lots.of.Enthusiasm
import honour.code
import team.work

public class TCSCodeVita {
 String CT_DT_ReferenceNum;
 String emailID;
 String secretCode;
 boolean isRegistrationSuccessful = false;
 protected String getReferenceNum(){
      CT_DT_ReferenceNum = registerTo("https://tcs.nextstep.com");
      return CT_DT_ReferenceNum;
 }

public boolean registerForCodeVita(){
  if(today.date > '22-July-2013' && today.date < '10-Aug-2013'){
   loginTo("https://tcs.nextstep.com");
   if(null != CT_DT_ReferenceNum){
        submitSelfDetails(emailID); // choose role - {team lead or team member}
        if(you.chose("team_lead")){
            invitePartner();
            makePartnerRegister(); // call to external system
       }else if(you.chose("team_member")){
           while(!inviteReceived){
               waitForInviteFromPartner();
               shakeUpWakeUpPartner(); // call to external system
           }
       }
       secretCode = waitForSecretCodeToBeDeliveredToCampusCommuneInbox();
       secretCode.doNotShareWithPartner = true;
       if(secretCode.received){
            return (isRegistrationSuccessful = true);
       }else{
           return (isRegistrationSuccessful = false);
       }    
   }else{
        this.CT_DT_ReferenceNum = getReferenceNum();
       registerForCodeVita();
    } // End of RefNum check
  } // End of timeline
}  // End of method


public void doPractice(){

  if(isRegistrationSuccessful){
   loginTo("https://tcscodevita.com", CT_DT_ReferenceNum, emailID, secretCode);
   readContestRules();
   acceptContestRules();
   setMyNotifications(); // highly recommended
   Timestamp contestStartTime = startContest();

  while((now()-contestStartTime) < "6:00 hrs"){
    solution = solveProblemsInAnySupportedLanguage(useFavouriteIDE);
    int Status = solution.submit();
    String statusMessage = "";
    switch (Status) {
  case TLE:  statusMessage = "Optimize run-time ofyour program.";
                     break;
  case MLE:  statusMessage = "Reduce memory footprint of your program"
                     break;
  case WA:  statusMessage = "Some Test Cases are failing. Take a closer look at your program";
                    break;
  case RTE:  statusMessage = "Catch-All error message. Program did something, it shouldnt have.";
                    break;
  case CTE:  statusMessage = "Compile-time error. Using the same compiler as CodeVita systems?";
                    break;
case PE:       statusMessage = "Presentation Error. Dont worry. Will get full credits for this solution." +               
                      "Go solve another problem."; 
                     break;
case ACC:   statusMessage = "Good Job, Champ! Go solve another problem.";
                    break;
default:        statusMessage = "No defaults";
                    break;
    }
    System.out.println(statusMessage);
    }
   }

   validateBrowserSettings();
   validateNetworkSettings();
   validateCompilerSettings();
  
  if(tomm < "11th Aug 2013"){
    if(interested){
     comeBackTommorrow();
     practiceForAnotherSixHrs();
    }
   }
  }
 }


 public void firstRound(String dateOfContest){
  String startTime = "9 AM on " + dateOfContest;
  String endTime  = "9 AM on " + (dateOfContest+1); // next day
  String loginTime = loginAnyTimeBetween(startTime,endTime);
  if(endTime - loginTime > "6 hrs")
  {
   System.out.println("You get your allotted quota of 6 hrs");
  }else{
   System.out.println("You get " + (endTime - loginTime) + " time for your tests.");
  }
 }

 public boolean waitForResults(String resultsDate){
  boolean yourTeamMadeItToNextRound = false;
  int rank = resultTable.lookup(CT_DT_ReferenceNum);
  if(resultDate.equals(17th Aug 2013")){
   if(rank < 301){
    yourTeamMadeItToNextRound = true;
   }
  }else if(resultDate.equals(24th Aug 2013")){
   if(rank < 11){
    yourTeamMadeItToNextRound = true;
   }
  }  
  return yourTeamMadeItToNextRound;
 }


 public boolean GrandFinale(String grandFinaleDate){
  boolean hadFun = false;
  travelToTCSOfficeForFinale();
  compete();
  if(win || lose){
   hadFun = true;
  }if(absent || couldNotMakeIt){
   hadFun = false;
  }
  return  hadFun; 
 }


 public static void main(String args[]){
  TCSCodeVita codevita = new TCSCodeVita();
  codevita.registerForCodeVita();
  codevita.doPractice();
  if(needMotivation||likeReading==true)
  {
   visit("codevita.blogspot.com");
   visit("campus commune");
  }
  codevita.firstRound("13th  Aug  2013");  //  starts  9 AM  13th  Aug,  finishes  9  AM  14th  Aug  2013.  Individual
session duration is 6 hrs.
  codevita.waitForResults("17th Aug 2013");
  codevita.secondRound("20th Aug 2013");
  codevita.waitForResults("24th Aug 2013");
  codevita.GrandFinale("3rd Sep 2013");

 if(rank<4)
  {
   for(int i=1;i<4;i++)
   {
    winExcitingPrize(i);
   }
  }
 }
}

Disclaimer: -  This is meant to be a fun way of disclosing CodeVita process of participating in 2013 event. The pseudo-code in no way overrides or overrules formal communications received from official sources. The above is purely for entertainment purposes.

Tuesday, August 6, 2013

CodeVita 2K12 – A 1-2-4 Experience

Hello Friends,

This is Ashutosh, Absar and Nikita from ABES Engineering College, Ghaziabad. We were the third runner-ups in the very first edition of CodeVita.

Here we are with our wonderful journey of CodeVita – 2K12.

CodeVita, one of its kind contest, was announced by TCS last year for the first time. When we got a promotional mail through the campus commune portal, we were quite excited to know about the details and waited eagerly for it. Finally the dates were announced and the registrations started.

Team Formation:

The team formation in our case was quite interesting. It was just a matter of some phone calls which brought us altogether. Before that we had never thought of being in a team. Finally we were a team.
Though we had participated in many inter-college competitions individually but it was the first online competition for us. The scenario is different in case of online competition where your code is tested against an online judge. It was a new thing for us and the practice round helped us a lot to know what exactly the platform was and how did we need to code. The advantage with our team was that we all knew to code in both C as well as Java, though we preferred Java.

After the registrations were over the dates for the different rounds were announced. Seeing the huge number of registrations we were little bit nervous.

Round 1:

This was an online round where you need to code from your place. There were five problems and we had a time slot of 6 hours to solve them. The questions were labelled as Easy, Medium and Hard. When we had a first look at the questions, we thought those could be solved easily. But the real fun began when we solved the very first question and uploaded it to end up with a “Wrong Answer”. It was then we realized that we had missed on something. We once again read the question properly and analysed it to find certain test cases on our own especially the boundary cases. Then we worked accordingly and now with more confidence uploaded the question. To our disappointment this time we got a “Time Limit Exceeded” error. Now we realized that we really need to optimize the code and a very general approach (brute-force was what we were trying) would not suffice. Later on after some optimizations we uploaded the code and finally got “Accepted” status for our first code.

At this stage, we realized that things were not as easy as we thought them to be and we continued to code the further questions by dividing our work for the problems and having discussions on the approach as and when needed.

Finally at the end of our 6 hour slot, we had successfully solved 4 problems. We were quite relaxed but we had no idea about whether we would be selected for the further rounds.
The results were to be announced after 2-3 days. We were waiting for the results. As the results were announced, we received a mail saying that we had been moved to the second round. We were too happy but had a very little idea about our rank. To our surprise, we were on the top of the list in the first round.

It was now the time for round 2 which was after 4-5 days. We had started preparing for it from some online coding sites and solved many problems. Finally the day came.

Round 2:

Here again there were five problems as in round 1, but obviously the level of questions was better than that of round 1.
We did not repeat the same mistakes of round 1 and solved the first question quite fast. Now it was the time for the other questions which were little bit tough. Finally we ended up with solving 3 questions correctly and 1 question was almost done with some small error.
Since we had solved just three questions and competition was tough, we were disappointed by our performance and had left all our hopes for the finale.
When the results were announced we were one of the top 10 teams which were selected for the finals. We were surprised to know that and finally we were ready to go for the finale at TCS Sahyadri Park, Pune.

Final Round:

This was the toughest of all rounds and we had 9 questions to be solved in the same duration of 6 hours as in the previous rounds. It was very different from the previous rounds and the competitive environment with all the participants around us busy in coding made it more challenging. On the top of that, the challenge was increased when we were told about the live relay of codes to an audience in a different seminar hall.
After a long brainstorming session, finally the time was over and we were waiting for the results to be announced. We were happy to know that we were at the fourth place. Though we could not perform to meet our expectations but still we were satisfied.
We were awarded Provisional Job Offer Letter, Internship Offer with TCS R&D, IEEE Student Membership and a digital photo frame.

After CodeVita:

CodeVita was a great experience for us which involved a lot of fun and learning (and of course coding). It helped us to gain confidence and thus we participated in many online competitions on CodeChef and HackerRank which is still continuing.
We all have now completed our B.Tech(CSE). Absar and Nikita are now a part of TCS family and I am continuing my further studies (M.Tech CSE @IIT Guwahati).

We are thankful to TCS for organising such a great event and also to Mr. Amol Khanapurkar who provided us this opportunity to share our experience.

Now its time for the second edition of the event which is being conducted at a much larger scale. If you have little interest in coding you should surely give it a shot. It’s a wonderful opportunity which should not be missed in any case.

The experience makes us to wish that we could be one of the participants in this edition too.

Few Guidelines:

  1. Read the problem carefully and consider all the cases (even the worst ones you can think of).
  2. File handling, Error handling, I/O operations and Input validations are the areas you should be comfortable with.
  3. Avoid wasting time searching for the solutions of the questions on internet. Rather try to work out on your own and write your own code.
  4. Plagiarism is prohibited, so don’t share you code even with your best friend as it may land up both of you in trouble and may even lead to disqualification.
  5. Use the same version of compilers as specified as those will be used on the online judge irrespective of the version you are using.
  6. Never be in hurry and don’t panic. Stay calm while solving the problems.

All the Best for CodeVita’13!!!


KEEP CODING !!!

CodeVita 2012 - Team Chennai

It all began in the month of July when our TPO had called all the students for a presentation for which we had the representatives from TCS, Chennai. They had come to give us a basic idea about an event that was going to change our lives forever. Yes you guessed it right !! It is the TCS Codevita 2012 Coding Competition organised by TCS to bring out the coding whiz inside you. Looking from that day onwards, TCS Code Vita has been an incredible journey for the three of us – Sriram Baskaran, Shankar Narayanan and  myself -Hari Raghav from Meenakshi Sundarajan Engineering College , Chennai.

So what is this contest about?

     Code Vita is one of the well organized and excellently coordinated coding contests conducted by TCS involving people from over India. It involved three rounds where the number of teams kept on gradually reducing from 12,000 and odd down to just 10. The problem statements were having a difficulty level of easy, medium or hard. The questions were as simple as Transpose of a matrix or as complex as providing a solution to a NP Complete problem. The technical team involved in this event had worked exceptionally in order to provide intriguing questions to the participants.

On the D’day :

     The 6 hour coding marathon came to the end with a nail biting finish. We were nervous and were constantly refreshing the screen of Mooshak server hoping to be in the top 4 of the rankings, as time was running out, and before the results. When we came back to the Audi, there was a delay in announcing the results, our hearts were pumping hard, hands were cold. Finally the results were out and when our names were called out, it was the best feeling , excitement mixed with joy! We were placed Second lagging by just one problem which the first place had submitted in the last second. But nonetheless It was a sense of accomplishment for us.

The aftereffects:

     This particular event had radically transformed our lives and for that we would first like to thank TCS for having initiated such a nationwide competition to encourage young people like us to take up coding as a sport. When we went back to college, TCS came for campus recruitment. Our team were specially called and given our offer letters and it was really great to receive one without sitting in the room for an interview! Also the other bonuses that we got were a new Samsung Galaxy tab , IEEE membership and an internship.

Final words:

     Experience is considered the best teacher. The important thing in life is not victory but the battle. We never expected to win when we registered. We just wanted to take part in the event and learn something out of it. 

Some tips :

1. Beware of boundary conditions. Most of the test cases will check if your code is robust by giving values that are outside the input range. The codes are tested mainly for this. 

2. Better to use simple command prompt for running Java when the programs are related to Command Line Arguments. 

3. Prepare common functions like print(), get() so you don’t have to type in everytime.

4. Use IDE to code faster and better.

5. Have a clear mind and think logically step by step as if you would solve the problem manually. Try to code that and then enhance it to satisfy the time and space requirements.

6. Learn a lot about the complexities, how they are calculated so that you can apply them quickly and code efficiently.

7. Enjoy whatever you type and code. Every program in CodeVita you try to solve will definitely enhance your programming skills in a great way.





And finally as always , Happy Coding !!

Sunday, August 4, 2013

Codevita Guidelines from Winners of 2012

Hello Everyone,
     This is Akshay, Abhay and Rhushikesh from Walchand College of Engineering, Sangli. We stood 1st in Codevita in it's very first version last year which was like the best thing happened with us till date. We would like to share our wonderful experience with you all.

Begin:
     It all started when TCS started promoting about their very first National Level Coding challenge - Codevita 2012. When we heard about it, we thought to register for it and we were like 'it's National level programming contest man and how can we win it?' (This is our Negative Mind that speaks!). Many of you might be thinking like that currently. But, ultimately we registered because we were inspired by the thought,
" You Miss 100% of the shots that you don't take! "
 And I guess, everyone of you should follow the same.

     Team Formation: We are not going to advise on this. But, it would be great if you form a team in way that your team members are quite comfortable in at least 2 languages. Because there are some things that can be done easily in specific language. Abhay was C Expert, Rhushikesh and I preferred Java.

Journey:
{
     After all registration process, the date of 1st round was announced and it was on the day before our In-Semsester exam at College. We were thinking whether should we attempt or not. But, again we gave a shot which ultimately paid off. 
     The online coding round system was new to us, as we all had experience of Inter-college competitions. The Major difference between such competitions and online coding round is, in later you can not convience unless it's perfectly right. In case of online coding round, your code gets tested against the Test cases that are already generated. So, your code has to go successfully throught each and every test case, otherwise it will not get accepted.

Coding Rounds:
     You might be knowing the rules and guidelines by now. In first round we had 5 problems statements to solve. And after reading them, we thought they were quite easy. But, after creating solution file and uploading it we got error message that, Wrong Answer !
     Then we realized that you need to re-look all edge cases and corners for our code to get 'Accepted'. It's very important to read the Problem statement very carefully, otherwise you will surely miss some part of it and later you won't find that because of your ignorance. After the end of first round we were not sure about our selection for the second round.
     When the results of the First round were announced, We started looking from bottom of the list to find our name(Like the same scene from '3 idiots' !). Totally, 269 students were shortlisted for the second round of it. And we were not in 200-269, then 100-200 but at last we found our team standing at 12th place. So, we were really enthusiastic about second round now.
     The second round was very similar to first one but difficulty level was higher than that of first one. We gave our best but we thought if they select around 30-40 for the final round then we might get selected. And when the results of second round were out, we stood 9th and they had selected only 10 for the final round and were invited at TCS Sahyadri Park, Pune for the Final round.
Now, it was really getting hotter as it was final round and we were among Top 10 from all over India. Certainly it was a great feeling and we were quite contained with it. But, Thanks to All our Friends who encouraged us to go and Win it all.

Final Round:

      Yes, it was Sahyadri Park, TCS, Pune. It was great atmosphere and it was TCS where we could visit. It was a great place where we all had to code to win. The Final round was of 6 hours and the level of difficulty was even more than previous rounds. This was the chance where we could prove ourselves. We put our best in final round and ultimately we were the Winners. One just needs to be Cool and not panic in such rounds.
}

End:
     For us the End of Codevita is like Beginning of the new Journey as it opened Many new opportunities for us. First thing - We had Apple - iPads, TCS - provisional offer letters, IEEE student membership accounts. TCS also gave us opportunity to do Internship at Tata Research Development and Design Center, Pune which is the first Research and Development lab of TCS in India. The internship was a really bronze experience for all of us. We worked with senior scientists and learned a lot from them. Thanks to TCS and TRDDC for that.
We are really thankful to all TCS for providing such a huge opportunity. And as they are doing it again, we must say you should participate in this competition and don't miss this opportunity !!

Few Guidelines:
     1. If you want to practice or get feel of such competition then there are many websites like codechef, hackerrank which can provide a helpful experience.
     2. Read problem statement very carefully. (Don't miss out any statement)
     3. Think about all the test cases. (Never think Internet will help you solving a problem statement)
     4. Be comfortable with file handling and basic input output operations that are required.
     5. Solve easy problem statement first, instead of going into complicated things.
     6. Keep it simple.

You can reach any of us at:
Akshay Mohite, Abhay Doke, Rhushikesh Apte
And  for details of Codevita 2013, you can contact Amol Khanapurkar
All the Best for Codevita 2013 !!


Thursday, August 1, 2013

A wonderful journey called CodeVita!

Hello friends and fellow coders,

We are the team of Apaar Gupta, Ambuj pandey and Amal Srivastava from previous year’s edition of  CodeVita. And here we take the opportunity to share our experience with you all.

Our team did good in the previous year’s CodeVita. We stood 6th in the first round, topped the second round and were finally the second runner ups in the final round.

Preparation:
We were introduced to programming, rather inspired for it by looking at our seniors who used to participate in online contests and were winning accolades. We got in touch with them and started our own programming on online sites. Till this date we can’t clearly recall how we three bumped into each other and formed a team, but we have been a team ever since.

Earlier we were just some Computer Science guys who thought they have a knack of programming and can code well. But, lo and behold, we were introduced to a whole new world of algorithms, data structures, rules, constraints and what not. But gradually we got a hold of it. We even cleared the first round of ACM-International Collegiate Programming Contest (ICPC) 2011.

Our Journey:
Frankly speaking, we weren’t excited enough in the very beginning (as it was happening for the first time) and our expectations were not that high. It was after the first round that we scored the sixth position; there on we started getting vibes that if we put some efforts, this contest can be a game changer. And it did!  The second round will be particularly a memorable one to us. Especially the journey from a 30+ rank to 1st within last 1 hour is unforgettable. We can write an altogether different blog article to express our emotions about it.

Finally, in the third round, we were invited to TCS Pune Sahyadri Park Campus. The high-tech campus amidst lush green mountains melts your heart in the very first sight. It’s easy to fantasize yourself along with your laptop onto the grasses.  Anyway, the questions here were a bit more challenging in terms of test-cases. Even the easier ones had pit-falls and most submissions resulted in Time Limit Exceeded (TLE) and Wrong Answer(WA).

Experiences from CodeVita:
Prior to CodeVita, we were already  familiar with some online programming contests, having participated in some of them on CodeChef, TopCoder etc. We had also cleared the first round of ACM ICPC in 2011 (and subsequently in 2012).

But CodeVita was different, different in many aspects. Here we found that having core knowledge is not sufficient, you need to write a well rounded code that is impregnable and can’t be broken.

Tips to fellow coders/juniors/newbies:

1. Know your compiler:
The knowledge of which compiler is to be used is essential. Your compiler must match the one used by CodeVita. For C/C++ users who still use Turbo C, beware. CodeVita uses GCC compiler for C/C++ (and so does all others). It’s sad to see that many colleges still use Turbo C/C++ as their default compiler in their labs. They still think that the size of an int is 2 bytes!

Preferably use an IDE like CodeBlocks for C/C++ and Netbeans/Eclipse for Java. Also, it is advisable to prepare a template before attempting to code during the match.

2. Beware of Invalid Inputs and Corner Cases:
Your code might be tested against a plethora of invalid and random inputs. So you must put checks against them at all times, and prevent your code from breaking down. Watch out for corner cases every time before you design your solution.

For instance in Round 2 there was a problem on Income Tax calculation, it was “crazy” (we read that as whimsically clever) to create and test sample input and run them on an Online-IT simulator website and matching the results with our own. Crazy, aren’t we?

3. Know a bit about complexities:
Time complexity does play a vital role sometimes in deciding you solution. The first year students (FY16) might not be aware about it at all.

For example, there was a problem of finding primes up to a given number n that appeared in the first round. There the maximum limit of n was 1000. So any naive solution could pass. But the same question appeared in the second round too, but with the limits raised to 1000000. Now, the same code won’t run here (Time Limit Exceeded). So specialized methods are required (like Sieve etc).

Remember, your code can’t run forever.

4. Adhere to the output format strictly:
Do as is directed in the statement, print the answers as it is, print new lines (\n) wherever required, and no other characters at all. Not even an extra space here and there, as it could lead up to Presentation Errors (like previous year).

Some general tips:
5. Team effort:
At times like these, you aren’t judged on your personal intelligence/knowledge. What counts is the team’s glory. Understanding yours and others, weak and strong areas are an important factor.

As in our case, for instance, we were pretty clear if a problem on Strings and File Handling came across, it would be done by a specific member. Similarly if it’s an ad-hoc, the other one would take charge.

6. Strategize!
Unlike ICPC, here we are given three machines (one per member) in the on-site round. So, you can parallelise your work, such as three different coders working on three/two different problems. But remember, coding in the cozyness of your house is different from coding in the competitive environment setup of the on-site round. So prepare likewise.

Each problem is designated as Simple, Medium or Hard. Simple ones are mostly ad-hoc so you can solve them with ease (provided your grey matter is in good mood that day). Medium ones often look simple, but there are pitfalls that need be noted and acted upon. Hard ones expect some significant pen-paper minutes, so be prepared when you try attempting them.

7. Written materials:
Some problems are directly based on classical problems. You can carry a Introduction to Algorithms by Cormen for quick reference on the onsite round as they are allowed but do remember; any online help is strictly frowned upon and may lead to disqualification.

Winning and Aftermath:
The rewards from TCS were abundant. We were offered a provisional offer letter, an internship letter, an Amazon Kindle each (1st and 2nd rankers got iPad and Galaxy tabs) and an IEEE Student Membership. Now, having completed our B.E. we are about to join TCS very soon. And we’re very excited about it.

For us, the post CodeVita experience has been a wonderful one. CodeVita2k12 has brought us up to the strata amongst peers now that it provided us a significant social recognition. We were awarded in our college by every senior personality, and many treats and parties followed. The addiction for programming was revitalized by this feat and we also participated in programming events at IIT-Kanpur and also with IEEEXtreme.


Programming is weird thing to do. First you indulge in it, then face a sea full of obstacles like WA, TLE or Compile Error, but believe us, there is a *bliss* moment when your code runs after those brain wrecking times. Relish the ecstasy in CodeVita 2013. Keep calm, keep programming.