제출 #474098

#제출 시각아이디문제언어결과실행 시간메모리
474098ShahdMohamedGenetics (BOI18_genetics)C++17
27 / 100
2097 ms5576 KiB
///LW M4 ACC HAZ3L GAMED ///YARAB WALA...I MEAN YARAB ACC #include<bits/stdc++.h> #define ll long long #define endl "\n" const ll mod = (ll) 1e9 + 7; using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ll n,m,k; cin>>n>>m>>k; vector<string>v(n); for (ll i=0; i<n; i++) cin>>v[i]; ll ans=1; for (ll i=0; i<n; i++) { bool ok=1; for (ll j=0; j<n; j++) { if (j==i) continue; ll cnt=0; for (ll l=0; l<m; l++) { if (v[i][l]!=v[j][l]) cnt++; if (cnt>k) break; } if (cnt!=k) { ok=0; break; } } if (ok) { cout<<i+1<<endl; break; } } return 0; }

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

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