IBM / The Register

Programming Competition 2016

This Competition is now closed!

STARTS: 28th June 2016

ENDS: 28th August 2016

Welcome to The Register's IBM Cloudant programming competition 2016

Please take a look at the instructions to get started.

So what is Cloudant?

New opportunities equal new data challenges

Immediate and continuous access to data is no longer a luxury; it is a requirement. Today's applications are expected to run 24x7 and manage a variety of structured and unstructured data accessed by massive global networks of users, devices, sensors, vehicles and Internet-enabled goods. The need for scalable and globally accessible data has led to the rise of NoSQL technology as a practical alternative to relational databases. However, as the need for data access continually expands to the network edge, most databases are still grounded in a central data center.

IT budget killers such as moving databases to more powerful hardware, or bigger clusters, and constantly re-designing them in order to perform adequately, can be extremely costly and time consuming. Important planning considerations regarding the cost, scalability, and availability of your data layer now, will likely have a significant impact on the ROI of your data layer.

More info About Cloudant

Win an Alienware gaming computer and Oculus rift goggles!

Win an Alienware gaming computer and Oculus rift goggles!

The lucky winner, judged by our expert, will win an Alienware gaming computer and Oculus rift goggles!

What are you waiting for?

Competition Instructions

Programming languages

Your entry may be submitted in any of the following languages:

Java, VB, Swift, C'Dent, Node, PHP, Python

Class and file names

Entries must be submitted only in one of the languages specified.

The entry for a question must be a single zipped text file containing the source code of the program; you may not include binary files such as executables or Java archives.

As the question relates to Decathlon scoring, the main class name (if the language you are using uses one) must be Decathlon.

You must submit the solution for each question as a single source file called Decathlon.<e>, where <e> must be replaced with the appropriate extension for the language used.

Input and output files

Your program must read its input from a file called Decathlon.dat and send its output to a file called Decathlon.out. The main class must be named as noted above in order that the compiled executable can be run in the manner described above.

Your program must produce no screen output. If, for example, your program displays debugging or information messages on the screen it will be deemed to have failed regardless of the correctness of the content of the output file. By all means use this type of output for debugging during development, but be sure to remove it before you submit the solutions for judging.

Similarly the output file must be formatted precisely as per the specification in the question with regard to content, spacing and capitalisation. Again, extraneous output will cause an automatic failure. So if, for instance, the question asks for two blank lines between items and your program only leaves one, it will be classed as a failure. Similarly, if the question asks (say) for a certain number of space characters between items on a line, or for a column of numbers to be right-aligned with the rightmost character in a particular column, you must conform to these requirements or your solution will fail.

You may assume that the data lines within the input file (i.e. the items that your program is expected to process) are formatted correctly and are within the bounds specified in the question. You should, however, be prepared for the possibility that there may be extra characters and/or lines after the marker that denotes the end of the input file.

Time limit

The time limit for any submitted program to run to completion on the judges' computer is 60 seconds. All questions have been devised such that they are able to run to completion within this time limit so long as a sufficiently efficient algorithm is used.

Multiple submissions

If you have submitted your entry and you wish to submit another, that's absolutely fine (for instance, you may have done further testing after submission and found a bug). The judges will, however, mark only the last entry you submit.

Entries and judging

You should submit your solution via this web page. The judge will run your programme using test data (which is not published). No feedback will be given prior to the end of the competition.

The Question - Decathlon

The Decathlon is a sporting competition comprising ten events which is usually run over the course of two days. The events are of three types:

  • Running: 100m, 110m hurdles, 400m and 1,500m.
  • Throwing: Discus, javelin and shot put.
  • Jumping: Long jump, high jump and pole vault.

When calculating the scores for competitors:

  • Running events are measured in seconds (the time taken to run from start to finish).
  • Throwing events are measured in metres (the distance the piece of equipment is thrown).
  • Jumping events are measured in centimetres (the height or distance jumped/vaulted).

The points formulae are as follows, and are taken from the scoring template of the International Association of Athletics Federations (IAAF). Note that:

  • P is the number of points scored for the event in question by a competitor.
  • T is the time in seconds the competitor took to run a race.
  • M is the measurement in centimetres for jumps.
  • D is the distance in metres achieved in a throwing event.
  • T is the time in seconds for running events.
  • A, B and C are taken from the table below.
    Event Abbreviation A B C
    100m 100m 25.4347 18 1.81
    110m hurdles 110m 5.74352 28.5 1.92
    400m 400m 1.53775 82 1.81
    1500m 1500m 0.03768 480 1.85
    Discus Discus 12.91 4 1.1
    Javelin Javelin 10.14 7 1.08
    Shot put Shot 51.39 1.5 1.05
    Long jump Long 0.14354 220 1.4
    High jump High 0.8465 75 1.42
    Pole vault Pole 0.2797 100 1.35
  • For running events: P = A(B-T)C
  • For throwing events: P = A(D-B)C
  • For jumping events: P = A(M-B)C

In all cases P should be rounded down if it is not already an integer. So for instance 49.99 would round down to 49.

For example, a 100m time of 10.2 seconds would be calculated as 25.4347 x (18-10.2)1.81, which works out to 1047.412736, which in turn rounds down to 1047 points.

Input data

You will be presented with several data sets. Each data set will comprise a number of lines, with each line representing a competitor's score for an event and of the form:

  • The competitor's name, which will be a sequence of letters and may be hyphenated.
  • The abbreviation for the event (as per the previous table).
  • The time or distance achieved by the competitor in the event.

The items on each line will be separated by one or more whitespace characters (tabs and/or spaces) and may have trailing whitespace. Names and event abbreviations must be treated as case-insensitive.

Each data set will be followed by a line starting with a # mark and followed by zero or more whitespace characters. The end of the input data file will be signified by a line starting with two # marks and followed by zero or more whitespace characters. Data sets do not relate to each other (that is, scores do not carry over from one data set to the next).

You may assume that there will be no more than one entry in each data set for a given event for a given competitor, and that there will not be more than one competitor with the same name. You may also assume that there is at least one line in each data set, though data sets may not represent all ten decathlon events and may have different combinations of events for each competitor.

Output data

Your program must calculate the total scores and output a league table showing the competitors and their overall scores, in descending order of score. You may assume that there will not be any competitors with the same total score. Names must start in the first column of the output and be capitalised, and scores must be separated from names by the appropriate number of space characters to enable them to be right-justified with the rightmost digit of the score in the 25th column.

The output for data sets must be separated by a single blank line, though there should be no blank line after the output for the last data set.

Sample input

Carter 100m 10.64
Bush 100m 10.20
Reagan 100m 10.3
Reagan Javelin 60.4
Carter Javelin 64.3
REAGAN Long 690
Bush 400m 43.2

Sample output

BUSH                 1047
REAGAN               1023
CARTER                942

REAGAN               1534
BUSH                 1155
CARTER                803

Enter the competition here

Please submit your entry below. Our terms & conditions are available here.

Problems sending? Get in touch