제출 #878170

#제출 시각아이디문제언어결과실행 시간메모리
878170vjudge1Genetics (BOI18_genetics)C++17
46 / 100
2037 ms27600 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #pragma GCC optimize("Ofast,unroll-loops") #pragma GCC target("avx2") const int N = 4100 + 4; int n, m, k; string s[N]; bitset<N << 2> tmp, b[N]; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> n >> m >> k; for (int i = 0; i < n; ++i) { cin >> s[i]; for (int j = 0; j < m; ++j) { if (s[i][j] == 'A') { b[i][j] = true; } else if (s[i][j] == 'G') { b[i][j + m] = true; } else if (s[i][j] == 'C') { b[i][j + 2 * m] = true; } else if (s[i][j] == 'T') { b[i][j + 3 * m] = true; } } } for (int i = 0; i < n; ++i) { int cntOk = 0; for (int j = 0; j < n; ++j) { if (i == j) { continue; } tmp = b[i] ^ b[j]; cntOk += (tmp.count() == (k << 1)); } if (cntOk == n - 1) { cout << i + 1; return 0; } } return 0; }

컴파일 시 표준 에러 (stderr) 메시지

genetics.cpp: In function 'int main()':
genetics.cpp:46:35: warning: comparison of integer expressions of different signedness: 'std::size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   46 |             cntOk += (tmp.count() == (k << 1));
      |                       ~~~~~~~~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...