Submission #392146

# Submission time Handle Problem Language Result Execution time Memory
392146 2021-04-20T14:48:25 Z Victor Alternating Current (BOI18_alternating) C++17
0 / 100
3000 ms 460 KB
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = a; i < b; ++i)
#define per(i, a, b) for (int i = b - 1; i >= a; --i)
#define trav(a, x) for (auto& a : x)
#define sz(a) a.size()
#define umap unordered_map
#define uset unordered_set
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

int main() {
    cin.tie(0)->sync_with_stdio(0);

    int n, m,k;
    string dnas[4101];
    int cnt[4101];
    cin >> n >> m>>k;
    rep(i, 0, n) {
        cnt[i]=0;
        string dna;
        cin >> dna;
        dnas[i]=dna;
        rep(j,0,i){
            string prev=dnas[j];
            int diff=0;
            rep(l,0,m)if(dna[l]!=prev[l])++diff;
            if(diff==k)++cnt[j],++cnt[i];
        }
    }
    rep(i,0,n)if(cnt[i]==n-1)cout<<i+1<<endl;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Unexpected end of file - token expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Unexpected end of file - token expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Unexpected end of file - token expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 3059 ms 460 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Unexpected end of file - token expected
2 Halted 0 ms 0 KB -