제출 #522383

#제출 시각아이디문제언어결과실행 시간메모리
522383LucaDantasGenetics (BOI18_genetics)C++17
19 / 100
396 ms8744 KiB
// subtask n = 1800, only 'A' and 'C'
#include <bits/stdc++.h>
using namespace std;

constexpr int maxn = 1810;

bitset<maxn> b[maxn];

int main() {
	int n, m, k; cin >> n >> m >> k;
	string s;
	for(int i = 0; i < n; i++) {
		cin >> s;
		for(int i = 0; i < m; i++)
			s[i] = (s[i] == 'A') + '0';
		b[i] = bitset<maxn>(s);
	}
	
	for(int i = 0; i < n; i++) {
		bool ok = 1;
		for(int j = 0; j < n; j++)
			if(i != j && (b[i]^b[j]).count() != k) { ok = 0; break; }
		if(ok) printf("%d\n", i+1);
	}
}

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

genetics.cpp: In function 'int main()':
genetics.cpp:22:37: warning: comparison of integer expressions of different signedness: 'std::size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   22 |    if(i != j && (b[i]^b[j]).count() != k) { ok = 0; break; }
      |                 ~~~~~~~~~~~~~~~~~~~~^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...