Threads14 StrangeLoop Problems
Threads14 StrangeLoop Problems
Threads14 StrangeLoop Problems
Strange Loop
Problem Set
Input Format:
The first line contains t, the number of test cases. This is followed by t sets of lines. The first line in this set is n, i.e., the size of the puzzle. The next n lines contain the details of the table. So, each of these n lines is n integers long. The integers are in order from left to right and they denote the the magnet_no of the magnet that the space belongs to. After these n lines, there are 4 lines. The first line contains the number of north poles in each row and the second
contains the number of south poles in each row. The third line contains the number of north poles in each column and the fourth line contains the number of south poles in each column.
Output Format:
Print an NxN grid. A '+' is printed in place of a north pole and a '-' in place of a south pole. A neutral spot is filled by 0.
Sample Input:
This input corresponds to puzzle in the picture. 1 6 1 1 2 3 3 4 5 5 2 6 7 4 8 9 9 6 7 1 0 8 1 1 1 1 1 2 1 2 1 0 1 3 1 3 1 4 1 5 1 6 1 7 1 8 1 8 1 4 1 5 1 6 1 7 1 3 3 2 1 3 2 2 2 3 2 2 2 3 2 3 1 2 3 2 2 2 2 2
Sample Output:
+ 0 0 0 + 0 + + + + + 0 + + 0 0 0 + 0 + + 0 +
Scoring:
1. There will be three different test files on which your code will be tested. The files will be of increasing difficulty and size - Easy, Medium, and Hard. Each file will contain several test cases and you will be given partial marks for the problem only if your solution passes all the test cases of a given file. 2. Each test file will contain some partial marks, say 20 marks for Easy file, 30 for Medium file and 50 for Hard file. This is just tentative distribution, actual distribution of marks may be different from this. 3. After passing 1 or more rounds, your code will be assigned a score. This score will now be scaled down by the ratio of time taken by your solution to the time taken by the
best solution of the contest (in terms of performance). Say your code got 50 marks, i.e. passed Easy and Medium tests. If it took X seconds to complete the solution and the most optimal solution took Y seconds, your score will be scaled down to (50 * Y)/X. 4. Ranks will be calculated by sorting the codes in the descending order of their scores.
Input Format:
A cube's configuration is given to you as six 4x4 matrices of the form: N 1 N 2 N 3 N 4 N 5 N 6 N 7 N 8 N 9 N 1 0 N 1 1 N 1 2 N 1 3 N 1 4 N 1 5 N 1 6 where each Nn is a single digit between 1 and 6 (inclusive) representing the colour of that square. There will be a blank line after every 4x4 matrix. The faces will be given in the order F, R, B, L, U, D.
Output Format:
For a cube, you must print each `pKn` move on a new line.
Sample Output:
1 U 3 2 R 2
Scoring:
1. Scoring will be done by ranking the user submitted codes in decreasing order of the number of moves required to solve the puzzle. Another constraint is that, the code should terminate within some specific time and space which will be announced later.
Input Format:
The first line of the input is the colour of the coin assigned to you (W or B). The input is an 8x8 board with the state of the coins. B denotes that the black side of the coin faces up whereas W indicates that the white side of the coin faces up. 0 (zero) denotes that that grid has no coin and that a coin may be placed there. Yes, coins are only placed on the empty cells! Test Case #1 W 0 0 0 0 0 0 W 0 W B B B B W 0 0 0 0 0 B B B W 0 0 0 0 B B B W 0 0 0 W W W 0 B 0 B B B W W 0 0 0 0 0 0 0 W W B 0 W W W B 0 0 0 0
Test Case #2 B 0 0 0 0 0 0 W 0 W B B B B W 0 0 0 0 0 B B B W 0 0 0 0 B B B W 0 0 0 W W W B B 0 B B B W W 0 0 0 0 0 0 0 W W B 0 W W W B 0 0 0 0
Output Format:
You are given the state of the board and your program must output the optimal next move, in terms of the position where your coin should be places, so as to maximize your chances of winning. The output is an alphanumeric string of 2 characters with the first a letter that denotes the row and the second a number that denotes the column number. For example: d3 or any other alphanumeric string, K, where K[0] >= a and K[0] <= h K[1] >= 1 and K[1] <= 8
Scoring:
1. The agents submitted by the users will be competed against one another and the best agent will be declared winner. 2. Final contest will be conducted using the last submitted agents be the users. Tournament will be of round robin format. If there are any ties in the top positions after completion of all the rounds, tie breaking will be done by conducting playoffs among the same ranked bots. 3. To give the users an idea of how their agents are performing with respect to other agents, a tentative rank-list will be published nearly after every 3 hours. This rank-list will be generated using double elimination on user submitted agents.