Submit | All submissions | Best solutions | Back to list |
COMBAPOW - GO POKEMON GO! |
Pokemon GO! has gotten viral and people of all ages have started playing it. G33K a chemistry professor have also started playing the game, he got his first Pokemon "charmander" but he is a bit confused of his Pokemon's combat power, in professor's mobile the combat power is represented by 4 distinct integers separated by space i1,j1,i2,j2 and a formula is being given which calculates the final combat power of Pokemon!
The formula goes like this -
Since G33k is a chemistry professor he is weak in programming , your task is to calculate the combat power for the professor!
Input
The problem will consist of t test cases, each containing four numbers
t <= 100
4 integers separated by space i1, j1, i2, j2
1 <= i1, j1, i2, j2 <= 100000
i1 < j1, i2 < j2
Output
print the combat power of Pokemon in a new line!
Example
Input: 1 2 3 4 5 Output: 16
Added by: | surayans tiwari |
Date: | 2016-07-21 |
Time limit: | 0.100s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: MAWK BC NCSHARP COFFEE DART FORTH GOSU JULIA KTLN OCT PROLOG PYPY3 R RACKET SQLITE SWIFT UNLAMBDA |
Resource: | self |
hide comments
2016-07-22 22:46:51 Francky
@Sushovan Sen : it seems to be the very first problem of psetter. @psetter: it is better to move this problem to tutorial, as there is yet GCDEX, and as there were some issues at start (weak input, changes in description/TL, language restrictions unjustified, deleted comments), and still. I'm sure you'll do better things for your next problem. Thanks for your comprehension. @franky: Thanks for your advice, I will move it to tutorial Last edit: 2016-07-23 05:03:42 |
|
2016-07-22 21:30:48 Sushovan Sen
It is better if you increase number of test cases/range and give some proper time limit. @sushovan: as franky mentioned there will be nothing left in the problem if I increase the time limit, it will be same as GCDX , the time limit set will allow you to think more about the problem. Last edit: 2016-07-23 05:00:00 |
|
2016-07-22 10:28:51 Bhuvnesh Jain
@author, why did you disqualify by submission? Any specific reason. @bhuvnesh: the problem statement and time limit has been changed, read it carefully! Last edit: 2016-07-22 11:15:49 |