FIT1045/FIT1053 Programming Competition

Round 1 Scoreboard

Round 2 Scoreboard

Round 3 Scoreboard

Overall Scoreboard

Registration

The registration requires the following two steps.
  1. Create an account at www.codeforces.com
  2. Fill out the Registration Form. The registration form must be filled in by logging in to your Monash account. If you cannot access the link due to permission issues, it indicates that you have logged in using your personal email address. In that case, open Google Chrome in incognito mode, log in to Monash account and then copy and paste the registration link there.
After you have registered for the competition, you will receive an invitation to join a private group at www.codeforces.com. You will see the contest in that group. The email is sent manually so you may need to wait for a couple of days to get the invitation. Also, you will not receive an email for the invitation - you will need to login to www.codeforces.com to see the invitation . If you do not see the invitation after three days of completing registration, send an email to aamir.cheema@monash.edu with your codeforces handle/username.

Important: Participants who are found to have multiple registrations will be disqualified.

Schedule

RoundStart date End date Scoreboard
Round 1 Friday 18:00:00, Week 3 Friday 18:00:00, Week 6 Scoreboard
Round 2 Friday 18:00:00, Week 6 Friday 18:00:00, Week 9 Scoreboard
Round 3 Friday 18:00:00, Week 9 Sunday 23:59:00, Week 11 Scoreboard

Prizes

  1. The overall winner of the competition will receive a medal. The medal will be presented in lecture week 12.
  2. Top-5 contestants will receive commendation certificates (in lecture week 12).

Contest Rules

Reading input and displaying output

Many beginners have difficulty understanding how to read input and generate output for the questions on www.codeforces.com. This is a guide to get you started on this. We will use the problem Way Too Long Words in this guide. Carefully read this problem before you proceed.

The sample input for the program is given below:

4
word
localization
internationalization
pneumonoultramicroscopicsilicovolcanoconiosis
	
	
The solution to the above problem is given below:

# read the first number and call it n
# IMPORTANT: Do not include any prompt, e.g., do not use n = int(input("Enter: "))
n = int(input()) 

for i in range(n): # since there will be n words, read them one by one
    word = input()
    answer = word
    if len(word) > 10:
        answer = word[0] + str(len(word)-2) + word[-1]

    # Print the output. It must exactly follow the described output format including whitespaces
    print(answer)

	
Copy the above code to a file say abbre.py. To test your program, run this in IDLE. It will wait for you to enter the input. Copy all lines of the input and paste in IDLE where it is waiting for your input. If your program is correct, it should display you the sample output shown in the problem description. If there are any issues or errors, fix those. Once you are happy with your program, submit your solution on the problem page Way Too Long Words. The program will be tested on various test cases and, if your program is correct, "Accepted" will be displayed.

Below is a sample input for the problem Next Round .

8 5
10 9 8 7 7 7 5 5
	
	
For this problem, you need to read two lines. First line contains two integers (n and k) and the second line contains n integers. Below is a sample solution for this problem. Note how the input is read.

import math
# read the first line which consists of two numbers
line = input()

# Use the split function to split the line based on whitespace " "
line = line.split(" ")

# n is the first number. It needs to be converted to integer
n = int(line[0])

# k is the second number. It needs to be converted to integer
k = int(line[1])

# read the second line
line = input()

# split the line based on " "
line = line.split(" ")

count = 0
kth = 0
# we know there are exactly n numbers on the second line. access these one by one
for i in range(n):   
    # read each number 
    num = int(line[i])

    # We only count if the score is greater than 0
    if num > 0:
        if i == k-1:
		# kth stores the score of k-th ranked contestant
            kth = num
        if num >= kth:
            count += 1
        
# print the output   
print(count)

	
Copy the above code and save it as a file. Run the program in IDLE and copy and paste the sample input. It should display you the sample output given on the correct page. Once you are happy with the program, submit it to www.codeforces.com and the online judging system will mark it. Once you are confident reading inputs, you may start attempting the questions in the round 1 (if it is already open). Otherwise, you may continue practicing on www.codeforces.com.

How to practice

You are encouraged to practice as much as you can for the contest. In addition to www.codeforces.com, below are some other websites for practice. You may also join the weekly practice sessions organized by Monash University Programming Team. For more details, contact me or Darcy Best at darcy DOT best AT Monash DOT EDU