제출 #951572

#제출 시각아이디문제언어결과실행 시간메모리
951572mochaGenetics (BOI18_genetics)C++14
27 / 100
2028 ms30452 KiB
#include <bits/stdc++.h> using namespace std; const int mx = 4105; int n, m, k; int a[mx][mx]; string st[mx]; int main() { cin.tie(0);ios::sync_with_stdio(0); cin >> n >> m >> k; for (int i=0;i<n;i++) { cin >> st[i]; } for (int i=0;i<m;i++) { for (int j=0;j<n;j++) { for (int k=0;k<n;k++) { if (st[j][i] != st[k][i]) { a[j][k]++; } } } } int ans = -1; for (int i=0;i<n;i++) { bool fl = 1; for (int j=0;j<n;j++) { if (i == j) continue; if (a[i][j] != k) { fl = 0; break; } } if (fl) { cout << i+1 << "\n"; return 0; } } }

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

genetics.cpp: In function 'int main()':
genetics.cpp:25:6: warning: unused variable 'ans' [-Wunused-variable]
   25 |  int ans = -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...