제출 #1224806

#제출 시각아이디문제언어결과실행 시간메모리
1224806ByeWorldGenetics (BOI18_genetics)C++20
46 / 100
2093 ms17480 KiB
#include <bits/stdc++.h> #pragma GCC optimize("O3") // #define int long long #define ll long long #define fi first #define se second #define lf ((id<<1)) #define rg ((id<<1)|1) #define md ((l+r)>>1) #define pb push_back #define ld double using namespace std; const int MAXN = 2e5+10; const ld INF = 1e9+10; typedef pair<int,int> pii; void chmn(auto &a, auto b){ a = min(a, b); } int n, m, k; string s[4110]; int a[4110][4110]; bool done[4110]; signed main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); cin>>n>>m>>k; for(int i=1; i<=n; i++){ cin>>s[i]; } for(int i=1; i<=n; i++){ // if(done[i]) continue; for(int j=i+1; j<=n; j++){ if(done[j] && done[i]) continue; int dif = 0; for(int p=0; p<m; p++){ if(s[i][p] != s[j][p]) dif++; if(dif > k) break; } if(dif != k){ done[i] = 1; done[j] = 1; } } } for(int i=1; i<=n; i++){ if(done[i]) continue; cout << i << '\n'; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...