제출 #861718

#제출 시각아이디문제언어결과실행 시간메모리
861718serifefedartarGenetics (BOI18_genetics)C++17
19 / 100
2079 ms19284 KiB
#include <bits/stdc++.h> using namespace std; #define fast ios::sync_with_stdio(0);cin.tie(0); #define s second #define f first typedef long long ll; const ll MOD = 1e9+9; const ll LOGN = 20; const ll MAXN = 4100 + 100; bitset<4200> bs[MAXN]; int main() { fast int N, M, K; cin >> N >> M >> K; for (int i = 1; i <= N; i++) { string s; cin >> s; for (int j = 0; j < M; j++) { if (s[j] == 'A') bs[i][j] = 1; } } for (int i = 1; i <= N; i++) { int cnt = 0; for (int j = 1; j <= N; j++) { bitset<4200> res = bs[i] ^ bs[j]; if (res.count() == K) cnt++; } if (cnt + 1 == N) { cout << i << "\n"; return 0; } } }

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

genetics.cpp: In function 'int main()':
genetics.cpp:31:20: warning: comparison of integer expressions of different signedness: 'std::size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   31 |    if (res.count() == K)
      |        ~~~~~~~~~~~~^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...