My accepted solution
#include <bits/stdc++.h>using namespace std;const int maxx5 = 1e5 + 5;int main() {int n, h, x;cin >> n >> h;vector <int> a(n);for (int i = 0; i < n; i ++) {cin >> a[i];}int pos = 0;bool flag = false;while (cin >> x) {if (x == 0) {
Read more… (3 words)