제출 #878886

#제출 시각아이디문제언어결과실행 시간메모리
878886vjudge1Genetics (BOI18_genetics)C++17
27 / 100
2043 ms5724 KiB
#include <bits/stdc++.h> #define file_io freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout); #define fast_io ios::sync_with_stdio(false);cin.tie(0); #define what(x) cerr << #x << " is " << x << '\n'; #define kill(x) {cout << x << '\n'; return 0;} #define all(x) (x).begin(), (x).end() #define pii pair<int, int> #define pll pair<ll, ll> #define pb push_back #define ll long long #define F first #define S second const ll inf = 1e18, mod = 1e9 + 7, delta = 1e9 + 9, SQ = 450, P = 6065621; using namespace std; #pragma GCC optimize("Ofast,unroll-loops") #pragma GCC target("avx2") const ll N = 5e3, LG = 20; string s[N]; int main() { fast_io; int n, m, k; cin >> n >> m >> k; for (int i = 1; i <= n; i++) cin >> s[i]; for (int i = 1; i <= n; i++) { bool b = false; for (int j = 1; j <= n; j++) { if (i == j) continue; int cnt = 0; for (int l = 0; l < m; l++) cnt += (s[i][l] != s[j][l]); if (cnt - k) { b = true; break; } } if (b) continue; cout << i << '\n'; exit(0); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...