Submission #722173

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7221732023-04-11 13:39:58Jarif_RahmanGenetics (BOI18_genetics)C++17
100 / 100
1853 ms33316 KiB
#include <bits/stdc++.h>
#define pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int next(int a, int b){
return uniform_int_distribution<int>(a, b)(rng);
}
int n, m, k;
bitset<4100> candidate;
char s[4100][4100];
int cnt[4100][4];
int dna[255];
int comp(int a, int b){
int c = 0;
for(int i = 0; i < m; i++) if(s[a][i] != s[b][i]) c++;
return c;
}
int ans = -1;
void dfs(int nd){
if(ans != -1) return;
if(!candidate[nd]) return;
int nxt = -1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

genetics.cpp: In function 'int main()':
genetics.cpp:88:30: warning: array subscript has type 'char' [-Wchar-subscripts]
   88 |             cnt[j][dna[s[i][j]]]++;
      |                        ~~~~~~^
genetics.cpp:93:85: warning: array subscript has type 'char' [-Wchar-subscripts]
   93 |             for(int j = 0; j < m; j++) for(int x = 0; x < 4; x++) if(x != dna[s[i][j]]) c+=cnt[j][x];
      |                                                                               ~~~~~~^
genetics.cpp:94:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   94 |             if(c != k*cur.size()-k*in[i]) candidate[i] = 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...