Against time

A timed problem-solving competition.

Participate

Winners

Place Name Prize
1st Pritipriya Dasbehera JBL Headphones
2nd Bikash Ranjan Sahu Anti Theft Laptop Bag
3rd Aritra Mukhopadhyay Boat Wireless Earphones

Judging Criteria

The rules for the game are given below.

  1. This is an Individual Contest. No team submissions are allowed. Answer as many problems as you can.
  2. Common Loopholes are forbidden, by default.
  3. Use of built-in libraries is allowed, provided CodeChef supports the libraries and that, they do not violate Rule 2, above.
  4. You can make up to 5 submissions, the score for the best one will be considered for the ranking.
  5. You are allowed to access your language documentation.
  6. You will get 5*(passed test)/(total tests) points for every submitted question.
  7. In case of a tie, the submission which clears the tests faster wins (run time, not complexity).
  8. If you submit before time then for every 10 minutes left to 1800hrs you will get 1 extra point.
  9. The form will be open till midnight, but for every 1 minute after 1800 hrs, you will lose 1 point.

Problems

The problems are listed below. For detailed information refer to this document.

Karan likes the number 4 very much. Impressed by the power of this number, Karan has begun to look for occurrences of four anywhere. He has a list of T integers, for each of them he wants to calculate the number of occurrences of the digit 4 in the decimal representation. He is too busy now, so please help him.

Full question here

In a company, an employee is paid as under. If his basic salary is less than Rs. 1500, then HRA = 10% of base salary and DA = 90% of basic salary.

If his salary is either equal to or above Rs. 1500, then HRA = Rs. 500 and DA = 98% of basic salary. If the Employee's salary is input, write a program to find his gross salary.
NOTE: Gross Salary = Basic Salary + HRA + DA

Full question here

Akhil has many balls of white and black colors. One day, he was playing with them. During the play, he arranged the balls into two rows both consisting of N number of balls. These two rows of balls are given to you in the form of strings X, Y. Both these strings consist of 'W' and 'B', where 'W' denotes a white-colored ball and 'B' is a black color ball.

Other than these two rows of balls, Akhil has an infinite supply of extra balls of each color. he wants to create another row of N balls, Z in such a way that the sum of Hamming distance between X and Z, and hamming distance between Y and Z is maximized.

Hamming Distance between two strings X and Y is defined as the number of positions where the color of balls in row X differs from the row Y ball at that position. e.g. Hamming distance between "WBB", "BWB" is 2, as, at positions 1 and 2, corresponding colors in the two strings differ.

As there can be multiple such arrangements of row Z, Akhil wants you to find the lexicographically smallest arrangement which will maximize the above value.

Full question here

Vishal loves running. He often visits his favorite Nehru Park and runs for very long distances. On one such visit, he found that the number of girls in the park was unusually high. Now he wants to use this as an opportunity to impress a large number of girls with his awesome speed.

The track on which he runs is an N kilometers long straight path. There are a_i girls standing within the ith kilometer of this path. A girl will be impressed only if Vishal is running at his maximum speed when he passes by her. But he can run at his best speed only for a single continuous stretch of K kilometers. Now Vishal wants to know what is the maximum number of girls that he can impress.

Full question here

Covid-19 is spreading fast! There are N cities, numbered from 0 To (N−1), arranged in a circular manner. City 0 is connected to city 1, 1 to 2, …, city (N−2) to city (N−1), and city (N−1) to city 0. The virus is currently in city X. Each day, it jumps from its current city to the city K to its right, i.e., from city X to the city (X+K)%N. As the virus jumps, the cities in-between don't get infected. Cities once infected stay infected. You live in city Y . Find if it will reach your city eventually. If it will, print YES, else print NO.

Full question here


Submission

The submissions should be submitted only through the following google form.

Eligibility

Be a student of NISER during the academic year 2021-22.

Schedule

Event Date time
Event Declaration 5th November 2021
Submission deadline 2359hrs, 5th November 2021
Results 30th June 2022

*Terms and Conditions apply