# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
394381 |
2021-04-26T13:16:29 Z |
SorahISA |
GTA (COI14_gta) |
C++17 |
|
11 ms |
5344 KB |
#pragma GCC optimize("Ofast", "unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
using pii = pair<int, int>;
template<typename T>
using Prior = std::priority_queue<T>;
template<typename T>
using prior = std::priority_queue<T, vector<T>, greater<T>>;
#define X first
#define Y second
#define eb emplace_back
#define ALL(x) begin(x), end(x)
#define RALL(x) rbegin(x), rend(x)
#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
inline int getRand(int L, int R) {
if (L > R) swap(L, R);
return (int)(rng() % (uint64_t)(R - L + 1) + L);
}
template<typename T>
ostream& operator << (ostream &os, vector<T> vec) {
for (int i = 0; i < vec.size(); ++i) {
if (i) os << " ";
os << vec[i];
}
return os;
}
int score[256];
void solve() {
score['A'] = 1, score['C'] = 2, score['G'] = 1, score['T'] = 2;
int n; cin >> n;
vector<int> val(n, 0);
for (auto &x : val) {
string str; cin >> str;
for (auto c : str) x += score[c];
x %= 3;
}
for (auto x : val) {
for (auto y : val) cout << "01"[x == y];
cout << "\n";
}
}
int32_t main() {
fastIO();
int t = 1; // cin >> t;
for (int _ = 1; _ <= t; ++_) {
// cout << "Case #" << _ << ": ";
solve();
}
return 0;
}
Compilation message
gta.cpp: In function 'void solve()':
gta.cpp:45:39: warning: array subscript has type 'char' [-Wchar-subscripts]
45 | for (auto c : str) x += score[c];
| ^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
392 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
844 KB |
Output isn't correct |
10 |
Incorrect |
11 ms |
5344 KB |
Output isn't correct |