Submission #1214013

#TimeUsernameProblemLanguageResultExecution timeMemory
1214013aykhnGenetics (BOI18_genetics)C11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define inf 0x3F3F3F3F3F3F3F3F const int MXN = 5e3 + 1; const int mod = 1e9 + 7; int val[MXN]; int mp[1000]; int id[MXN][4]; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); signed main() { ios_base::sync_with_stdio(0); cin.tie(0); mp['A'] = 0, mp['C'] = 1, mp['G'] = 2, mp['T'] = 3; int n, m, k; cin >> n >> m >> k; for (int i = 0; i < n; i++) val[i] = rng() % mod; string s[n]; for (int i = 0; i < n; i++) { cin >> s[i]; for (int j = 0; j < m; j++) { int x = mp[s[i][j]]; id[j][x] = (id[j][x] + val[i]) % mod; } } for (int i = 0; i < n; i++) { int need = 0, have = 0; for (int j = 0; j < n; j++) { if (i != j) need = (need + val[j] * k % mod) % mod; } for (int j = 0; j < m; j++) { for (int x = 0; x < 4; x++) { if (x != mp[s[i][j]]) have = (have + id[j][x]) % mod; } } if (have == need) { cout << i + 1 << '\n'; return 0; } } assert(0); }

Compilation message (stderr)

genetics.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.