# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
934090 | darya_navard | GTA (COI14_gta) | C++17 | 7 ms | 5724 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |