Submission #427929

# Submission time Handle Problem Language Result Execution time Memory
427929 2021-06-15T05:22:38 Z tengiz05 Lamps (JOI19_lamps) C++17
4 / 100
10 ms 4412 KB
#include <bits/stdc++.h>
int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int n;
    std::cin >> n;
    std::string a, b;
    std::cin >> a >> b;
    int ans = 0;
    for (int i = 0; i < n; i++) {
        if (b[i] != '1') {
            continue;
        }
        while (i + 1 < n && b[i + 1] == '1') {
            i++;
        }
        ans++;
    }
    std::cout << ans << "\n";
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 6 ms 4412 KB Output is correct
8 Correct 7 ms 4388 KB Output is correct
9 Correct 8 ms 4388 KB Output is correct
10 Correct 10 ms 4364 KB Output is correct
11 Correct 9 ms 4412 KB Output is correct
12 Correct 8 ms 4384 KB Output is correct
13 Correct 8 ms 4348 KB Output is correct
14 Correct 6 ms 4320 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -