Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #define FASTER() ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
- #define ff first
- #define ss second
- #define pb push_back
- #define all(a) a.begin(), a.end()
- #define dbg(x) cerr<<__LINE__<<" "<<#x<<" "<<x<<endl
- typedef long long ll;
- using namespace std;
- struct position {
- int x, y, free;
- };
- int main() {
- FASTER();
- int n = 9;
- vector <vector <int>> mt(n, vector <int>(n));
- for(int i = 0; i < n; i++) {
- for(int j = 0; j < n; j++) {
- char c;
- cin >> c;
- c == '.' ? mt[i][j] = -1 : mt[i][j] = c - '1'; //starts from 0
- }
- }
- vector <vector <int>> comps(n, vector <int>(n));
- for(int i = 0; i < n; i++) {
- for(int j = 0; j < n; j++) {
- char c;
- cin >> c;
- comps[i][j] = c - '1';
- }
- }
- vector <vector <vector <int>>> cnt(n, vector <vector <int>>(n, vector <int>(n))); //для каждой точки - сколько чисел заняты
- vector <vector <int>> rows(n, vector <int>(n)); //для строки
- vector <vector <int>> cols(n, vector <int>(n)); //для столбца
- for(int i = 0; i < n; i++) { //идем по строкам и пишем для каждой строки все сущ-е цифры
- for(int j = 0; j < n; j++) {
- if(mt[i][j] != -1) {
- rows[i][mt[i][j]] = 1;
- }
- }
- }
- for(int j = 0; j < n; j++) {
- for(int i = 0; i < n; i++) {
- if(mt[i][j] != -1) {
- cols[j][mt[i][j]] = 1;
- }
- }
- }
- vector <position> pos; //заплоняем позиции
- for(int i = 0; i < n; i++) {
- for(int j = 0; j < n; j++) {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment