H. Eyad and Math

Codeforces
IDCF10150H
Time2000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Eyad was given a simple math problem, but since he is very bad at math he asked you to help him. Given 4 numbers, a, b, c, and d. Your task is to find whether ab is less than cd or not. *It is guaranteed that the two numbers above are never equal for the given input.* The first line contains an integer T (1 ≤ T ≤ 105), where T is the number of test cases. Then T lines follow, each line contains four integers a, b, c, and d (1 ≤ a, b, c, d ≤ 109). For each test case, print a single line containing "_<_" (without quotes), if ab is less than cd. Otherwise, print "_>_" (without quotes). ## Input The first line contains an integer T (1 ≤ T ≤ 105), where T is the number of test cases.Then T lines follow, each line contains four integers a, b, c, and d (1 ≤ a, b, c, d ≤ 109). ## Output For each test case, print a single line containing "_<_" (without quotes), if ab is less than cd. Otherwise, print "_>_" (without quotes). [samples]
**Definitions** Let $ T \in \mathbb{Z} $ be the number of test cases. For each test case $ k \in \{1, \dots, T\} $, let $ (a_k, b_k, c_k, d_k) \in \mathbb{Z}^4 $ be four integers. **Constraints** 1. $ 1 \leq T \leq 10^5 $ 2. For each $ k \in \{1, \dots, T\} $: $ 1 \leq a_k, b_k, c_k, d_k \leq 10^9 $ **Objective** For each test case $ k $, determine the relation between $ a_k \cdot b_k $ and $ c_k \cdot d_k $: - If $ a_k \cdot b_k < c_k \cdot d_k $, output $ < $ - Otherwise (since equality is guaranteed not to occur), output $ > $
API Response (JSON)
{
  "problem": {
    "name": "H. Eyad and Math",
    "description": {
      "content": "Eyad was given a simple math problem, but since he is very bad at math he asked you to help him. Given 4 numbers, a, b, c, and d. Your task is to find whether ab is less than cd or not. *It is guara",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10150H"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Eyad was given a simple math problem, but since he is very bad at math he asked you to help him.\n\nGiven 4 numbers, a, b, c, and d. Your task is to find whether ab is less than cd or not.\n\n*It is guara...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ T \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, T\\} $, let $ (a_k, b_k, c_k, d_k) \\in \\mathbb{Z}^4 $ be four integers.\n\n**Constraints**...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments