# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
952914 | koukirocks | Genetics (BOI18_genetics) | C++17 | 2091 ms | 18972 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define speed ios_base::sync_with_stdio(0); cin.tie(0)
#define all(x) (x).begin(),(x).end()
#define F first
#define S second
namespace{using namespace std;}
typedef long long ll;
typedef double db;
typedef long double ldb;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MAX=4200+10,P=1e9+7;
const ll INF=0x3f3f3f3f,oo=0x3f3f3f3f3f3f3f3f;
int n,m,k;
bitset<4200> gne[MAX];
int main() {
speed;
cin>>n>>m>>k;
for (int i=1;i<=n;i++) {
for (int j=0;j<m;j++) {
char c;
cin>>c;
gne[i][j]=(c=='A');
}
}
int ans=-1;
for (int i=1;i<=n;i++) {
bool flag=true;
for (int j=1;j<=n;j++) {
if (i==j) continue;
if ((gne[i]^gne[j]).count()!=k) {
flag=false;
break;
}
}
if (flag) {
ans=i;
break;
}
}
cout<<ans<<"\n";
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |