Advertisement
silentkiler029

problemset-series-01-problem-1,2

Nov 10th, 2020 (edited)
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.74 KB | None | 0 0
  1. /*
  2.  
  3.         PROBLEM-01:
  4.         --------------------------------------------------------------------------------
  5.         HAEDEST PROBLEM EVER
  6.         --------------------------------------------------------------------------------
  7.  
  8.         Statement:
  9.         Shawon has a farm which has a length of 'a' unit and a width of 'b' unit. Shawon wants to calculate the area of the farm. But he has lost the measurments. But his younger brother Sadhin remembers the lcm and the gcd of 'a' and 'b'.
  10.  
  11.         Given the lcm and the gcd. You have to determine the area of the farm.
  12.  
  13.         Input:
  14.         You will be given two integer 'l' and 'g' which denotes the lcm and the gcd of 'a' and 'b' respectively. 1 <= l, g <= 5x10^4.
  15.  
  16.         Output:
  17.         You have to print the area of the firm.
  18.  
  19.  
  20.  
  21.         Sample Input:
  22.         1 1
  23.         Sample Output:
  24.         1
  25.  
  26.  
  27.  
  28.         PROBLEM-02:
  29.         --------------------------------------------------------------------------------
  30.         Biden-Trump -> Bump!
  31.         --------------------------------------------------------------------------------
  32.  
  33.         Statement:
  34.         Trump and Biden are the two competitors of USA president election of this year. Election Board decided that this year the election process will be held in a different method.
  35.  
  36.         The Election Board noticed that there are total 'r' * 'c' states in USA. They have suffled those states randomly and formed a matrix with 'r' rows and 'c' columns. Each element of the matrix denotes the total number of electoral votes of the corresponding state. But Trump and Biden do not have any idea about the elements of the matrix.
  37.  
  38.         Now Trump has to choose one row or one column from the matrix and also Biden has to do the same. The number of electoral votes that Trum or Biden gets shall be the total electoral votes of the row or column that they choose.
  39.  
  40.         You have to determine the maximum difference between the number of votes that Trump and Biden might get. You have to answer for several test cases.
  41.  
  42.         Input:
  43.         The first line will contain an integer 't' denoting the number of test cases. 1 <= t <= 100.
  44.         Each test case will start with a line containing two integer 'r' and 'c' denoting the number of rows and the number of columns of the matrix. 1 <= r, c <= 100. Each of the next 'r' lines will contain 'c' positive integers. All of these integers will be less than 101.
  45.  
  46.         Output:
  47.         For each test case, print a single line that contains the maximum difference between the number of votes that Trump and Biden might get.
  48.  
  49.         Sample Input:
  50.         2
  51.         3 3
  52.         1 2 3
  53.         4 5 6
  54.         7 8 9
  55.         3 3
  56.         2 2 2
  57.         2 2 2
  58.         2 2 2
  59.  
  60.         Sample Output:
  61.         18
  62.         0
  63.  
  64.         PROBLEM-03:
  65.         --------------------------------------------------------------------------------
  66.         Plus-Minus
  67.         --------------------------------------------------------------------------------
  68.  
  69.         Statement:
  70.         abcd
  71.  
  72.  
  73. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement