rasinrohit's blog

By rasinrohit, history, 17 months ago, In English

If you were to rate some IOI problems by CodeForces difficulty rating scheme, what would be the average difficulty level of question ?

Or, what is the range of difficulty of IOI problems in CodeForces' terms

Or, If some IOI problems were to come in CodeForces, what would be their average difficulty level ?

Or, Questions of what difficulty level I must solve on CodeForces in order to consider myself a good candidate for IOI ?

Read more »

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

By rasinrohit, history, 18 months ago, In English

I am relatively new to Competitive Programming as you can tell by my Rating.
I have started feeling that my code is more of a patchwork.
I run the program, see the answer is off by some digits and change that by hard coding.
I don't focus much on the logic behind the wrong answer.
Also , even simple programs sometimes extend to over 75-80 lines of code which seems very inefficient .
Below mentioned is an example of my code.
It's the second problem from Educational Codeforces Round 85.
I was not able to solve it within the 2:00 hours, so I don't know if it is correct or not.But, that doesn't matter. I just want to know what coding practices I should use inorder to clean this mess.,
Am I the only one who is facing this issue or it's common with new programmers ?

I am using JAVA 14

~~~~~

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
import java.util.Collections;

public class practice
{
    public static void main(String[] args)
    {
       Scanner input = new Scanner(System.in);
       int sizeOfArray=0,lotOfMoney;
       ArrayList<Long> savings = new ArrayList<Long>();
       int t = input.nextInt();
       Long sum=(long)0;
       double avg=0.0;
       int loopControler;
       for(int i=0;i<t;i++)
       {
         savings.clear();
         sizeOfArray = 0;
         lotOfMoney = 0;
         sizeOfArray =  input.nextInt();
         loopControler = sizeOfArray;
         lotOfMoney  = input.nextInt();
         for(int j=0;j<sizeOfArray;j++)
         {
          savings.add(input.nextLong());
         }
         Collections.sort(savings , Collections.reverseOrder());
         //System.out.println(savings);

         for(int o=0;o<sizeOfArray;o++)
         {
          for(int l=0;l<loopControler;l++)
          {
              sum = savings.get(l) + sum;
          }
          avg = (double)sum/loopControler;
          //System.out.println("averag is : "+avg);
          if(avg>=lotOfMoney)
          {
              System.out.println(loopControler);
              avg=0;
              sum =(long)0;
              break;
          }
          else if(savings.get(0) < lotOfMoney)
          {
              System.out.println("0");
              break;
          }

          else
          {
              avg =0 ;
              sum =(long)0 ;
              loopControler--;
          }
         }
       }
    }
}

~~~~~

PS : If, these types of questions are not supposed to be asked on Code Forces and are against it's policies , please let me know, I'll remove/change it
Thanks

Read more »

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

By rasinrohit, history, 18 months ago, In English

Hey !
This is my first time writing a blog at CF so, pardon any mistakes.

Just wanted to raise a simple question here,
please answer considering that I want to be a software engineer/Android app developer.
Is college really important ?

I mean a normal private engineering college in India costs about Rs.5,00,000 and takes about 4 years.

With that much money and time one can easily :
- Buy 60+ books
- Buy 20+ online courses
- Pay for 5-6 Certifications like Associate Android Developer offered by Google and other tech giants
- Make 5-10 (or even more) software and Applications
- Freelancing
- Competitive Programming
and a lot more...
And still be left with money and time !
What really surprises me is that literally everyone chooses college.
What i want to know from this is , how come all this mentioned above has been outweighed by a college degree ?


As far as job security is concerned , I know enough examples of people spending a lot of money and time on college and then end up unemployed and now they don't have enough money to even start a small business.

Edit:For people saying that it will be difficult to get a job. Please consider the following points and let me know what you think by editing your comments.
- Earn a Certification offered by Tech Companies like Oracle and Google.
- Make multiple projects (in my case softwares and apps)and publish them commercially.
- Reach out people on social media.
- Participate in competitions like CodeJam, HashCode, KickStart.
- Give contribution on sites like SO and CF.
Thanks.

Read more »

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