# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
934090 | darya_navard | GTA (COI14_gta) | C++17 | 7 ms | 5724 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |