제출 #952915

#제출 시각아이디문제언어결과실행 시간메모리
952915koukirocksGenetics (BOI18_genetics)C++17
47 / 100
1405 ms18920 KiB
#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 #pragma GCC optimize("O3") #pragma GCC target("avx2") 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) 메시지

genetics.cpp: In function 'int main()':
genetics.cpp:37:31: warning: comparison of integer expressions of different signedness: 'std::size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   37 |    if ((gne[i]^gne[j]).count()!=k) {
      |        ~~~~~~~~~~~~~~~~~~~~~~~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...