12 solutions
-
0
#include <iostream> using namespace std;
int main() { int m, n; cin >> m >> n; int seats[100][100]; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { cin >> seats[i][j]; } }
int k; cin >> k; int count = 1; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { if (seats[i][j] == 0) { if (count == k) { cout << i + 1 << " " << j + 1 << endl; return 0; } count++; } } } return 0;
}
Information
- ID
- 101
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 8
- Tags
- # Submissions
- 97
- Accepted
- 18
- Uploaded By