{"problem":{"name":"Let's Get a Perfect Score","description":{"content":"$N$ participants, numbered $1$ to $N$, will participate in a contest with $M$ problems, numbered $1$ to $M$. For an integer $i$ between $1$ and $N$ and an integer $j$ between $1$ and $M$, participant ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc282_b"},"statements":[{"statement_type":"Markdown","content":"$N$ participants, numbered $1$ to $N$, will participate in a contest with $M$ problems, numbered $1$ to $M$.\nFor an integer $i$ between $1$ and $N$ and an integer $j$ between $1$ and $M$, participant $i$ can solve problem $j$ if the $j$\\-th character of $S_i$ is `o`, and cannot solve it if that character is `x`.\nThe participants must be in pairs. Print the number of ways to form a pair of participants who can collectively solve all the $M$ problems.\nMore formally, print the number of pairs $(x,y)$ of integers satisfying $1\\leq x < y\\leq N$ such that for any integer $j$ between $1$ and $M$, at least one of participant $x$ and participant $y$ can solve problem $j$.\n\n## Constraints\n\n*   $N$ is an integer between $2$ and $30$, inclusive.\n*   $M$ is an integer between $1$ and $30$, inclusive.\n*   $S_i$ is a string of length $M$ consisting of `o` and `x`.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $M$\n$S_1$\n$S_2$\n$\\vdots$\n$S_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc282_b","tags":[],"sample_group":[["5 5\nooooo\noooxx\nxxooo\noxoxo\nxxxxx","5\n\nThe following five pairs satisfy the condition: participants $1$ and $2$, participants $1$ and $3$, participants $1$ and $4$, participants $1$ and $5$, and participants $2$ and $3$.\nOn the other hand, the pair of participants $2$ and $4$, for instance, does not satisfy the condition because they cannot solve problem $4$."],["3 2\nox\nxo\nxx","1"],["2 4\nxxxx\noxox","0"]],"created_at":"2026-03-03 11:01:13"}}