Submission #1090351

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10903512024-09-18 09:23:16andrei_iorgulescuGenetics (BOI18_genetics)C++14
46 / 100
2015 ms31056 KiB
#include <bits/stdc++.h>
using namespace std;
mt19937 rng(8962);
int n, m, k;
char a[4105][4105];
bitset<4105> bs[4105];
bool mna(int x, int y)
{
if (n <= 100)
{
int df = 0;
for (int i = 1; i <= m; i++)
if (a[x][i] != a[y][i])
df++;
if (df == k)
return true;
return false;
}
else
{
if ((bs[x] ^ bs[y]).count() == k)
return true;
return false;
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

genetics.cpp: In function 'bool mna(int, int)':
genetics.cpp:25:37: warning: comparison of integer expressions of different signedness: 'std::size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   25 |         if ((bs[x] ^ bs[y]).count() == k)
      |             ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
genetics.cpp: In function 'int main()':
genetics.cpp:77:13: warning: unused variable 'cate' [-Wunused-variable]
   77 |         int cate = 0;
      |             ^~~~
genetics.cpp:102:13: warning: unused variable 'cate' [-Wunused-variable]
  102 |         int cate = 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...