#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;
else 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 |
344 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
348 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 |
5864 KB |
Output isn't correct |