Submission #789466

#TimeUsernameProblemLanguageResultExecution timeMemory
789466Trisanu_Das Martian DNA (BOI18_dna)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; long long n, k, cnt, x, a[200010], b[200010], c[200010], l = 1, r, minn = 1e18; int main() { cin >> n >> k >> cnt; for (int i = 1; i <= n; i++) cin >> a[i]; for (int i = 1; i <= cnt; i++) { cin >> x; cin >> b[x]; } while (r <= n) { if (cnt) { r++; c[a[r]]++; if (c[a[r]] == b[a[r]]) cnt--; } else { minn = min(minn,r-l+1); if (c[a[l]] == b[a[l]]) cnt++; c[a[l]]--; l++; } } if (minn == 1e18) cout << "impossible" << endl; else cout << minn << endl; }e

Compilation message (stderr)

dna.cpp:27:2: error: 'e' does not name a type
   27 | }e
      |  ^