Submission #1274699

#TimeUsernameProblemLanguageResultExecution timeMemory
1274699Davdav1232Genetics (BOI18_genetics)C++20
Compilation error
0 ms0 KiB
#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
#pragma GCC target("avx,avx2,fma,tune=native")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<vector<int>> vii;
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n, m, k; cin>>n>>m>>k;
    vector<pair<string, int>> villains(n);
    for(int i=0; i<n; i++){
        cin>>villains[i].first;
        villains[i].second=i+1;
    }
    for(int i=0; i<n; i++){
        for(int j=0; j<m; j++){
            if(villains[i].first[j]=='A') villains[i].first[j]-='A';
            if(villains[i].first[j]=='C') villains[i].first[j]-='C'-1;
            if(villains[i].first[j]=='G') villains[i].first[j]-='G'-2;
            if(villains[i].first[j]=='T') villains[i].first[j]-='T'-3;
        }
    }
    vector<bool> is_real(n, 1);
    int rounds=30;
    random_device g;
    while(rounds--){
        vector<vector<int>> count(m, vector<int> (4, 0));
        shuffle(villains.begin(), villains.end(), g);
        for(int i=0; i<n; i++){
            int curr=i*k;
            for(int j=0; j<m; j++){
                curr-=i-count[j][villains[i].first[j]];
                count[j][villains[i].first[j]]++;
            }
            if(curr!=0){
                is_real[villains[i].second-1]=0;
            }
        }
    }
    for(int i=0; i<n; i++){
        if(is_real[i]){
            cout<<i+1;
            return 0;
        }
    }
    return 0;
}

Compilation message (stderr)

In file included from /usr/include/c++/13/string:43,
                 from /usr/include/c++/13/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52,
                 from genetics.cpp:3:
/usr/include/c++/13/bits/allocator.h: In destructor 'constexpr std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/13/bits/allocator.h:184:7: error: inlining failed in call to 'always_inline' 'constexpr std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  184 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/13/string:54:
/usr/include/c++/13/bits/basic_string.h:181:14: note: called from here
  181 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~