API Response (JSON)
{
"problem": {
"name": "B2. Distinguish GHZ state and W state",
"description": {
"content": "You are given _N_ qubits (2 ≤ _N_ ≤ 8) which are guaranteed to be in one of the two states: * state, or * state.Your task is to perform necessary operations and measurements to figure out which s",
"description_type": "Markdown"
},
"platform": "Codeforces",
"limit": {
"time_limit": 1000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "CF1002B2"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You are given _N_ qubits (2 ≤ _N_ ≤ 8) which are guaranteed to be in one of the two states:\n\n* state, or\n* state.Your task is to perform necessary operations and measurements to figure out which s...",
"is_translate": false,
"language": "English"
},
{
"statement_type": "Markdown",
"content": "给定 #cf_span[N] 个量子比特(#cf_span[2 ≤ N ≤ 8]),它们保证处于以下两种状态之一:\n\n你的任务是执行必要的操作和测量,以确定它处于哪种状态,并在是 GHZ 态时返回 0,在是 W 态时返回 1。操作后量子比特的状态无关紧要。\n\n你需要实现一个操作,该操作以一个包含 #cf_span[N] 个量子比特的数组作为输入,并返回一个整数。\n\n你的代码应具有以下签名:\n\n[s...",
"is_translate": true,
"language": "Chinese"
},
{
"statement_type": "Markdown",
"content": "**Definitions** \nLet $ N \\in \\mathbb{Z} $ with $ 2 \\leq N \\leq 8 $. \nLet $ \\mathcal{H} = (\\mathbb{C}^2)^{\\otimes N} $ be the Hilbert space of $ N $ qubits. \nLet $ |\\text{GHZ}\\rangle = \\frac{1}{\\sqr...",
"is_translate": false,
"language": "Formal"
}
]
}