3 3 1 2 2 3 3 2
7 We have seven pairs of cities that can be the origin and destination: $(1,1),(1,2),(1,3),(2,2),(2,3),(3,2),(3,3)$.
3 0
3 We have three pairs of cities that can be the origin and destination: $(1,1),(2,2),(3,3)$.
4 4 1 2 2 3 3 4 4 1
16 Every pair of cities can be the origin and destination.
{
"problem": {
"name": "Tour",
"description": {
"content": "The republic of AtCoder has $N$ cities numbered $1$ through $N$ and $M$ roads numbered $1$ through $M$. Road $i$ leads from City $A_i$ to City $B_i$, but you cannot use it to get from City $B_i$ to Ci",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc204_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "The republic of AtCoder has $N$ cities numbered $1$ through $N$ and $M$ roads numbered $1$ through $M$.\nRoad $i$ leads from City $A_i$ to City $B_i$, but you cannot use it to get from City $B_i$ to Ci...",
"is_translate": false,
"language": "English"
}
]
}