Untitled
#include <iostream> using namespace std; int main() { int n, tmp, x, y; cin >> n; for (int i = 0; i < n; i++) { for (int a = 0; a < 10; a++) { for (int b = 0; b < 10; b++) { cin >> tmp; if (tmp) { x = a + 1; y = b + 1; } } } cout << x << ' ' << y << endl; } }