Submission #480288

#TimeUsernameProblemLanguageResultExecution timeMemory
480288BERNARB01Trapezi (COI17_trapezi)C++17
6 / 100
1 ms204 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<string> s(2 * n); for (int i = 0; i < 2 * n; i++) { cin >> s[i]; } if (n == 1) { if (s[0] == "000") { if (s[1] == "000") { cout << string(3, '1') << '\n' << string(3, '2') << '\n'; } else if (s[1] == "...") { cout << string(3, '1') << '\n' << string(3, '.') << '\n'; } else { cout << "nemoguce" << '\n'; } } else if (s[0] == "...") { if (s[1] == "000") { cout << string(3, '.') << '\n' << string(3, '1') << '\n'; } else { cout << "nemoguce" << '\n'; } } else if (s[0] == ".00") { if (s[1] == "..0") { cout << ".11\n..1\n"; } else { cout << "nemoguce" << '\n'; } } else if (s[0] == "0.0") { cout << "nemoguce" << '\n'; } else if (s[0] == "00.") { if (s[1] == "0..") { cout << "11.\n1..\n"; } else { cout << "nemoguce" << '\n'; } } else if (s[0] == "0..") { if (s[1] == "00.") { cout << "1..\n11.\n"; } else { cout << "nemoguce" << '\n'; } } else if (s[0] == ".0.") { cout << "nemoguce" << '\n'; } else if (s[0] == "..0") { if (s[1] == ".00") { cout << "..1\n.11\n"; } else { cout << "nemoguce" << '\n'; } } else { assert(false); } } else { cout << "nemoguce" << '\n'; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...