{"problem":{"name":"Counting Arrays","description":{"content":"You are given $N$ sequences numbered $1$ to $N$.   Sequence $i$ has a length of $L_i$ and its $j$\\-th element $(1 \\leq j \\leq L_i)$ is $a_{i,j}$. Sequence $i$ and Sequence $j$ are considered the same ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc226_b"},"statements":[{"statement_type":"Markdown","content":"You are given $N$ sequences numbered $1$ to $N$.  \nSequence $i$ has a length of $L_i$ and its $j$\\-th element $(1 \\leq j \\leq L_i)$ is $a_{i,j}$.\nSequence $i$ and Sequence $j$ are considered the same when $L_i = L_j$ and $a_{i,k} = a_{j,k}$ for every $k$ $(1 \\leq k \\leq L_i)$.  \nHow many different sequences are there among Sequence $1$ through Sequence $N$?\n\n## Constraints\n\n*   $1 \\leq N \\leq 2 \\times 10^5$\n*   $1 \\leq L_i \\leq 2 \\times 10^5$ $(1 \\leq i \\leq N)$\n*   $0 \\leq a_{i,j} \\leq 10^{9}$ $(1 \\leq i \\leq N, 1 \\leq j \\leq L_i)$\n*   The total number of elements in the sequences, $\\sum_{i=1}^N L_i$, does not exceed $2 \\times 10^5$.\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$L_1$ $a_{1,1}$ $a_{1,2}$ $\\dots$ $a_{1,L_1}$\n$L_2$ $a_{2,1}$ $a_{2,2}$ $\\dots$ $a_{2,L_2}$\n$\\vdots$\n$L_N$ $a_{N,1}$ $a_{N,2}$ $\\dots$ $a_{N,L_N}$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc226_b","tags":[],"sample_group":[["4\n2 1 2\n2 1 1\n2 2 1\n2 1 2","3\n\nSample Input $1$ contains four sequences:\n\n*   Sequence $1$ : $(1, 2)$\n*   Sequence $2$ : $(1, 1)$\n*   Sequence $3$ : $(2, 1)$\n*   Sequence $4$ : $(1, 2)$\n\nExcept that Sequence $1$ and Sequence $4$ are the same, these sequences are pairwise different, so we have three different sequences."],["5\n1 1\n1 1\n1 2\n2 1 1\n3 1 1 1","4\n\nSample Input $2$ contains five sequences:\n\n*   Sequence $1$ : $(1)$\n*   Sequence $2$ : $(1)$\n*   Sequence $3$ : $(2)$\n*   Sequence $4$ : $(1, 1)$\n*   Sequence $5$ : $(1, 1, 1)$"],["1\n1 1","1"]],"created_at":"2026-03-03 11:01:14"}}