The Templar TestProblem code: KC205 |
All submissions for this problem are available.
Points:10
The greatest enemies of the Brotherhood of Brom in their days were the Templar Knights, a band of highly skilled assassins originally established in 1118 to protect pilgrims and the Holy Sepulcher. Like the Brotherhood s game of testing each other s wits, the Knights too had a game of their own.
The game was played on a board with squares arranged on rows and columns. The pieces used in the game attacked pieces that were either (a) two rows and one column away from its position, or (b) one row and two columns away from its position.
This is exactly the nature of the problem you have been presented with at the finals of the global race in Rio de Janeiro. I n order to develop an unbeatable algorithm for the game, you are to determine the largest number of game pieces that can be placed on a board with M rows and N columns so that no piece is attacking any other. M and N will each be no larger than 500.Input
The first line of input consists of no of test cases T(<100).The next T lines consist of pairs of integers giving values for M and N.(M,N<=500)Output
For each input pair, display the number of pieces that can be appropriately placed.Example
Input:3 2 3 5 5 4 7Output:
4 13 14
| Author: | ankitbabbar |
| Date Added: | 16-10-2009 |
| Time Limit: | 5 sec |
| Source Limit: | 50000 Bytes |
| Languages: | ADA, ASM, BASH, BF, C, C99 strict, CAML, CLOJ, CLPS, CPP 4.0.0-8, CPP 4.3.2, CS2, D, F#, FORT, GO, HASK, ICK, ICON, JAR, JAVA, JS, LISP clisp, LISP sbcl, LUA, NEM, NICE, PAS fpc, PAS gpc, PERL, PERL6, PHP, PIKE, PRLG, PYTH, PYTH 3.1.2, RUBY, SCALA, SCM guile, SCM qobi, ST, TEXT, WSPC |
Comments
SUCCESSFUL SUBMISSIONS FOR THIS PROBLEM:
HELP
Program should read from standard input and write to standard output. After you submit a solution you can see your results by clicking on the [My Submissions] tab on the problem page. Below are the possible results:
- Accepted
Your program ran successfully and gave a correct answer. If there is a score for the problem, this will be displayed in parenthesis next to the checkmark. - Time Limit Exceeded
Your program was compiled successfully, but it didn't stop before time limit. Try optimizing your approach. - Wrong Answer
Your program compiled and ran succesfully but the output did not match the expected output. - Runtime Error
Your code compiled and ran but encountered an error. The most common reasons are using too much memory or dividing by zero. For the specific error codes see the help section. - Compilation Error
Your code was unable to compile. When you see this icon, click on it for more information.
If you are still having problems, see a sample solution here.

Fetching successful submissions

hey admin are you sure that
hey admin are you sure that the test cases are fine??
i mean.. m damn sure my logic isn't invalid.. i have crosschecked using two different algos, both give same answers.. kindly have a look at my submission.. m getting wrong answer for that
All submissions for this
All submissions for this problem are available.
below the above line, there is:
Points 10
Was it there by mistake or has it any meaning..?
There can be points for the practice problems also, for who ever solves it first..
@shashidhar, this qn appeared
@shashidhar, this qn appeared in an external contest hosted on codechef.
those points were there for original contest.
it is available for practise, but the points wont be there.
@shashidhar, this qn appeared
@shashidhar, this qn appeared in an external contest hosted on codechef.
those points were there for original contest.
it is available for practise, but the points wont be there.