답안 #934090

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
934090 2024-02-26T19:04:49 Z darya_navard GTA (COI14_gta) C++17
0 / 100
7 ms 5724 KB
#include <bits/stdc++.h>
using namespace std;

const int N = 110;

int n;
string s[N];

int main() {
    ios:: sync_with_stdio(0), cin.tie(0);
    cin >> n;
    for (int i = 0; i < n; i++) cin >> s[i];
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            bool flag = false;
            if (s[i].size() == 2 && s[j].size() == 1) swap(s[i], s[j]), flag ^= 1;
            if (s[i].size() == s[j].size() && s[i] == s[j]) cout << 1;
            if (s[i] == "G" && s[j] == "CT") cout << 1;
            else if (s[i] == "T" && s[j] == "GA") cout << 1;
            else if (s[i] == "A" && s[j] == "TC") cout << 1;
            else if (s[i] == "C" && s[j] == "AG") cout << 1;
            else cout << 0;
            if (flag) swap(s[i], s[j]);
        }
        cout << endl;
    }
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Incorrect 1 ms 348 KB Output isn't correct
4 Incorrect 1 ms 348 KB Output isn't correct
5 Incorrect 1 ms 348 KB Output isn't correct
6 Incorrect 1 ms 600 KB Output isn't correct
7 Incorrect 1 ms 348 KB Output isn't correct
8 Incorrect 1 ms 348 KB Output isn't correct
9 Incorrect 2 ms 860 KB Output isn't correct
10 Incorrect 7 ms 5724 KB Output isn't correct