Codeforces Round 303 (Div. 2)
A
Toy Cars
Codeforces
900
原题
←B →
翻译中…

Little Susie, thanks to her older brother, likes to play with cars. Today she decided to set up a tournament between them. The process of a tournament is described in the next paragraph.

翻译中…

There are $*n*$ toy cars. Each pair collides. The result of a collision can be one of the following: no car turned over, one car turned over, both cars turned over. A car is good if it turned over in no collision. The results of the collisions are determined by an $*n* × *n*$ matrix $*А*$: there is a number on the intersection of the $*і*$-th row and $*j*$-th column that describes the result of the collision of the $*і*$-th and the $*j*$-th car:

翻译中…
  • $- 1$: if this pair of cars never collided. $- 1$ occurs only on the main diagonal of the matrix.
  • $0$: if no car turned over during the collision.
  • $1$: if only the $*i*$-th car turned over during the collision.
  • $2$: if only the $*j*$-th car turned over during the collision.
  • $3$: if both cars turned over during the collision.
翻译中…

Susie wants to find all the good cars. She quickly determined which cars are good. Can you cope with the task?

翻译中…

Input

翻译中…

The first line contains integer $*n*$ ($1 ≤ *n* ≤ 100$) — the number of cars.

翻译中…

Each of the next $*n*$ lines contains $*n*$ space-separated integers that determine matrix $*A*$.

翻译中…

It is guaranteed that on the main diagonal there are $- 1$, and $- 1$ doesn't appear anywhere else in the matrix.

翻译中…

It is guaranteed that the input is correct, that is, if $*A*_{*ij*} = 1$, then $*A*_{*ji*} = 2$, if $*A*_{*ij*} = 3$, then $*A*_{*ji*} = 3$, and if $*A*_{*ij*} = 0$, then $*A*_{*ji*} = 0$.

翻译中…

Output

翻译中…

Print the number of good cars and in the next line print their space-separated indices in the increasing order.

翻译中…

样例

Input #1
3
-1 0 0
0 -1 1
0 2 -1
Output #1
2
1 3
InputCopy OutputCopy
Input #2
4
-1 3 3 3
3 -1 3 3
3 3 -1 3
3 3 3 -1
Output #2
0
InputCopy OutputCopy
题目信息
题号
545A
时间限制
1 s
内存限制
256 MB
标签
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。