Submission #480288

# Submission time Handle Problem Language Result Execution time Memory
480288 2021-10-15T14:11:23 Z BERNARB01 Trapezi (COI17_trapezi) C++17
6 / 100
1 ms 204 KB
#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 time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -