define _CRT_SECURE_NO_WARNI NGS include iostream include vector includ

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>
#include <cmath>
#include <iomanip>
#include <queue>
using namespace std;
char code[5][101] = {0};
char impCode[101] = {0};
int main() {
freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
int n = 0;
cin >> n;
string str;
for (int i = 0; i < 5; ++i)
{
cin >> str;
for (int j = 0; j < str.length(); ++j)
{
code[i][j] = str[j];
}
}
for (int i = 0; i < n; ++i)
{
bool hasX = false;
bool hasPoint = false;
for (int j = 0; j < 5; ++j)
{
if (code[j][i] == '.')
hasPoint = true;
if (code[j][i] == 'X')
hasX = true;
}
if (hasX && hasPoint)
{
cout << -1 << endl;
return 0;
}
if (hasX)
{
impCode[i] = 1;
continue;
}
if (hasPoint)
{
impCode[i] = 2;
}
}
for (int i = 0; i < n; ++i)
{
}
vector<int> answer;
return 0;
}