3 2 5 7 4 2 1
8 Consider the case we put $1, 0, 1, 4, 2, 0$ strawberries on Pieces $0, 1, 2, 3, 4, 5$, respectively. In this case, all requests of the friends are fulfilled, as follows: * Friend $0$: Pieces $0, 1, 2$ have a total of $2$ strawberries on them, which is not less than $A_0 = 2$. * Friend $1$: Pieces $1, 2, 3$ have a total of $5$ strawberries on them, which is not less than $A_1 = 5$. * Friend $2$: Pieces $2, 3, 4$ have a total of $7$ strawberries on them, which is not less than $A_2 = 7$. * Friend $3$: Pieces $3, 4, 5$ have a total of $6$ strawberries on them, which is not less than $A_3 = 4$. * Friend $4$: Pieces $4, 5, 0$ have a total of $3$ strawberries on them, which is not less than $A_4 = 2$. * Friend $5$: Pieces $5, 0, 1$ have a total of $1$ strawberry on them, which is not less than $A_5 = 1$. Thus, we can fulfill all requests of the friends by putting a total of $8$ strawberries on the cake. This is the minimum number of strawberries needed.
3 8 0 6 0 9 0
12 Consider the case we put $6, 0, 2, 1, 3, 0$ strawberries on Pieces $0, 1, 2, 3, 4, 5$, respectively. In this case, all requests of the friends are fulfilled, as follows: * Friend $0$: Pieces $0, 1, 2$ have a total of $8$ strawberries on them, which is not less than $A_0 = 8$. * Friend $1$: Pieces $1, 2, 3$ have a total of $3$ strawberries on them, which is not less than $A_1 = 0$. * Friend $2$: Pieces $2, 3, 4$ have a total of $6$ strawberries on them, which is not less than $A_2 = 6$. * Friend $3$: Pieces $3, 4, 5$ have a total of $4$ strawberries on them, which is not less than $A_3 = 0$. * Friend $4$: Pieces $4, 5, 0$ have a total of $9$ strawberries on them, which is not less than $A_4 = 9$. * Friend $5$: Pieces $5, 0, 1$ have a total of $6$ strawberries on them, which is not less than $A_5 = 0$. Thus, we can fulfill all requests of the friends by putting a total of $12$ strawberries on the cake. This is the minimum number of strawberries needed.
5 3 1 5 7 0 8 4 6 4 9
12 We can put $0, 0, 0, 4, 0, 1, 1, 1, 0, 5$ strawberries on Pieces $0, 1, \dots, 9$, respectively, to fulfill all requests of the friends. In this case, there is a total of $12$ strawberries on the cake, which is the minimum number of strawberries needed.
1 267503 601617
869120 We can put $267503$ strawberries on Piece $0$ and $601617$ strawberries on Piece $1$ to fulfill all requests of the friends.
8 418940906 38034755 396064111 43044067 356084286 61548818 15301658 35906016 20933120 211233791 30314875 25149642 42550552 104690843 81256233 63578117
513119404
{
"problem": {
"name": "Gateau",
"description": {
"content": "Mr. AtCoder made a round chocolate cake for his $2N$ friends. It is radially cut from the center into $2N$ equal pieces, numbered $0$ through $2N-1$ in clockwise order. To give the final touches, he i",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 3000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc117_f"
},
"statements": [
{
"statement_type": "Markdown",
"content": "Mr. AtCoder made a round chocolate cake for his $2N$ friends. It is radially cut from the center into $2N$ equal pieces, numbered $0$ through $2N-1$ in clockwise order.\nTo give the final touches, he i...",
"is_translate": false,
"language": "English"
}
]
}