| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 532612 | sidon | Genetics (BOI18_genetics) | C++17 | 2089 ms | 79640 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx2", "popcnt")
#include <string>
#include <bits/functexcept.h>
#include <iosfwd>
#include <bits/cxxabi_forced.h>
#include <bits/functional_hash.h>
#pragma push_macro("__SIZEOF_LONG__")
#pragma push_macro("__cplusplus")
#define __SIZEOF_LONG__ __SIZEOF_LONG_LONG__
#define unsigned unsigned long
#define __cplusplus 201102L
#define __builtin_popcountl __builtin_popcountll
#define __builtin_ctzl __builtin_ctzll
#include <bitset>
#pragma pop_macro("__cplusplus")
#pragma pop_macro("__SIZEOF_LONG__")
#undef unsigned
#undef __builtin_popcountl
#undef __builtin_ctzl
#include <bits/stdc++.h>
using namespace std;
const int Z = 4100;
int N, M, K;
bitset<Z*4> a[Z];
int g[100];
bool chk[Z][Z]; int cnt[Z][Z];
int main() {
ios::sync_with_stdio(0), cin.tie(0);
g['C'] = 1;
g['G'] = 2;
g['T'] = 3;
cin >> N >> M >> K;
for(int i = 0; i < N; ++i) {
string inp; cin >> inp;
for(int j = 0; j < M; ++j)
a[i][g[inp[j]] * Z + j] = 1;
}
int o[N];
iota(o, o + N, 0);
stable_partition(o, o + N, [](const int &i) {
return ((i ^ 1024) > N / 2);
});
for(int &i : o) {
bool ok = 1;
a[i].flip();
for(int j = 0; j < N; ++j) if(i != j) {
int c = (chk[i][j] ? cnt[i][j] : (a[i] & a[j]).count());
chk[i][j] = chk[j][i] = 1;
cnt[i][j] = cnt[j][i] = c;
if(c != K) {
ok = 0;
break;
}
}
if(ok) {
cout << i + 1;
return 0;
}
a[i].flip();
}
}컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
