[语言月赛202305] 线性代数初步

Luogu
IDLGB3762
Time1000ms
Memory512MB
DifficultyP1
2023O2优化顺序结构语言月赛
我们定义一种名为「行列式」的新运算: 对于四个整数 $a, b, c, d$,我们定义 $\begin{vmatrix} a & b \\ c & d \end{vmatrix}$ 为 $a, b, c, d$ 的行列式,其等于 $a \times d - b \times c$。 现在,给定 $a, b, c, d$,请你帮忙计算 $\begin{vmatrix} a & b \\ c & d \end{vmatrix}$ 的值是多少。 ## Input 输入共一行四个整数 $a, b, c, d$。 ## Output 输出共一行一个整数,代表 $\begin{vmatrix} a & b \\ c & d \end{vmatrix}$ 的值。 [samples] ## Note ### 样例 1 说明 $\begin{vmatrix} 3 & 7 \\ 4 & 9 \end{vmatrix} = 3 \times 9 - 4 \times 7 = -1$。 ### 数据规模与约定 对于 $100\%$ 的数据,保证 $-10 ^ 9 \leq a, b, c, d \leq 10 ^ 9$。
Samples
Input #1
3 7 4 9
Output #1
-1
API Response (JSON)
{
  "problem": {
    "name": "[语言月赛202305] 线性代数初步",
    "description": {
      "content": "我们定义一种名为「行列式」的新运算: 对于四个整数 $a, b, c, d$,我们定义 $\\begin{vmatrix} a & b \\\\ c & d \\end{vmatrix}$ 为 $a, b, c, d$ 的行列式,其等于 $a \\times d - b \\times c$。 现在,给定 $a, b, c, d$,请你帮忙计算 $\\begin{vmatrix} a & b \\\\ c & ",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB3762"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "我们定义一种名为「行列式」的新运算:\n\n对于四个整数 $a, b, c, d$,我们定义 $\\begin{vmatrix} a & b \\\\ c & d \\end{vmatrix}$ 为 $a, b, c, d$ 的行列式,其等于 $a \\times d - b \\times c$。\n\n现在,给定 $a, b, c, d$,请你帮忙计算 $\\begin{vmatrix} a & b \\\\ c & ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments