4 3 4 8 6 5 3 1 3 3 4 2 1
3 3 4 1 3 4 2 Initially, People $1, 2, 3, 4$ has pieces of baggage with weights $1, 3, 3, 5$, respectively, so no one is tired. First, we do the operation choosing Person $3$ and $4$. Now, people $1, 2, 3, 4$ has pieces of baggage with weights $1, 3, 5, 3$, so no one is tired yet. Second, we do the operation choosing Person $1$ and $3$. Now, people $1, 2, 3, 4$ has pieces of baggage with weights $5, 3, 1, 3$, so Person $1$ gets tired. Lastly, we do the operation choosing Person $4$ and $2$. Now, people $1, 2, 3, 4$ has pieces of baggage with weights $5, 3, 1, 3$, so no one gets tired. This sequence of operations has made everyone have the right piece of baggage, with the minimum possible number of operations, so it is valid.
4 1 2 3 4 4 3 2 1 4 3 2 1
\-1 No sequence of operations achieves the objective.
1 58 998244353 1
0 The objective is already achieved in the initial state.
{
"problem": {
"name": "Too Heavy",
"description": {
"content": "There are $N$ people numbered $1$ to $N$ and $N$ pieces of baggage numbered numbered $1$ to $N$. Person $i$ has a weight of $a_i$, and Baggage $j$ has a weight of $b_j$. Initially, Person $i$ has Bagg",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc111_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There are $N$ people numbered $1$ to $N$ and $N$ pieces of baggage numbered numbered $1$ to $N$. Person $i$ has a weight of $a_i$, and Baggage $j$ has a weight of $b_j$. Initially, Person $i$ has Bagg...",
"is_translate": false,
"language": "English"
}
]
}