Submission #202229

# Submission time Handle Problem Language Result Execution time Memory
202229 2020-02-14T10:11:31 Z dolphingarlic GTA (COI14_gta) C++17
0 / 100
645 ms 956 KB
#include <bits/stdc++.h>
using namespace std;

map<char, vector<int>> mp = {
	{'A', {1, 0, 3, 4, 5, 6, 7, 2}},
	{'C', {2, 5, 6, 0, 7, 3, 1, 4}},
	{'G', {7, 4, 5, 1, 6, 2, 0, 3}},
	{'T', {4, 7, 1, 6, 2, 0, 3, 5}}
};
			
vector<int> compose(vector<int> base, vector<int> trans) {
	vector<int> ret(8);
	for (int i = 0; i < 8; i++) ret[i] = trans[base[i]];
	return ret;
}

vector<int> perm[100];

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		perm[i] = {0, 1, 2, 3, 4, 5, 6, 7};
		string s;
		cin >> s;
		reverse(s.begin(), s.end());
		for (char j : s) perm[i] = compose(perm[i], mp[j]);
	}

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			if (perm[i] == perm[j]) cout << 1;
			else cout << 0;
			cout << " \n"[j == n - 1];
		}
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 376 KB Output isn't correct
2 Incorrect 5 ms 376 KB Output isn't correct
3 Incorrect 5 ms 376 KB Output isn't correct
4 Incorrect 6 ms 376 KB Output isn't correct
5 Incorrect 6 ms 376 KB Output isn't correct
6 Incorrect 6 ms 376 KB Output isn't correct
7 Incorrect 6 ms 376 KB Output isn't correct
8 Incorrect 12 ms 376 KB Output isn't correct
9 Incorrect 71 ms 504 KB Output isn't correct
10 Incorrect 645 ms 956 KB Output isn't correct