{"problem":{"name":"A+B+C","description":{"content":"You are given three sequences $A=(A_1,\\ldots,A_N)$, $B=(B_1,\\ldots,B_M)$, and $C=(C_1,\\ldots,C_L)$. Additionally, a sequence $X=(X_1,\\ldots,X_Q)$ is given. For each $i=1,\\ldots,Q$, solve the following","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc344_c"},"statements":[{"statement_type":"Markdown","content":"You are given three sequences $A=(A_1,\\ldots,A_N)$, $B=(B_1,\\ldots,B_M)$, and $C=(C_1,\\ldots,C_L)$.\nAdditionally, a sequence $X=(X_1,\\ldots,X_Q)$ is given. For each $i=1,\\ldots,Q$, solve the following problem:\nProblem: Is it possible to select one element from each of $A$, $B$, and $C$ so that their sum is $X_i$?\n\n## Constraints\n\n*   $1 \\leq N,M,L \\leq 100$\n*   $0 \\leq A_i, B_i ,C_i \\leq 10^8$\n*   $1 \\leq Q \\leq 2\\times 10^5$\n*   $0 \\leq X_i \\leq 3\\times 10^8$\n*   All input values are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$\n$A_1$ $\\ldots$ $A_N$\n$M$\n$B_1$ $\\ldots$ $B_M$\n$L$ \n$C_1$ $\\ldots$ $C_L$\n$Q$\n$X_1$ $\\ldots$ $X_Q$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc344_c","tags":[],"sample_group":[["3\n1 2 3\n2\n2 4\n6\n1 2 4 8 16 32\n4\n1 5 10 50","No\nYes\nYes\nNo\n\n*   It is impossible to select one element from each of $A$, $B$, and $C$ so that their sum is $1$.\n*   Selecting $1$, $2$, and $2$ from $A$, $B$, and $C$, respectively, makes the sum $5$.\n*   Selecting $2$, $4$, and $4$ from $A$, $B$, and $C$, respectively, makes the sum $10$.\n*   It is impossible to select one element from each of $A$, $B$, and $C$ so that their sum is $50$."]],"created_at":"2026-03-03 11:01:14"}}