GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 11 / 0 / 11
Functions: 100.0% 1 / 0 / 1
Branches: 60.0% 18 / 0 / 30

test/cpv/aizu-itp1/itp1_9_a.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/lesson/2/ITP1/all/ITP1_9_A
2 #include "../../../src/str/kmp/lib.hpp"
3
4 using namespace tifa_libs;
5 4 int main() {
6
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
7 4 strn s, p, _;
8
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 std::cin >> p;
9
4/6
✓ Branch 1 taken 364 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 364 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 360 times.
✓ Branch 7 taken 4 times.
364 while (std::cin >> _, _ != "END_OF_TEXT") {
10
2/2
✓ Branch 5 taken 1246 times.
✓ Branch 6 taken 360 times.
1606 for (char& c : _)
11
2/2
✓ Branch 0 taken 1242 times.
✓ Branch 1 taken 4 times.
1246 if (isalpha(c)) c = (char)tolower(c);
12
2/4
✓ Branch 1 taken 360 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 360 times.
✗ Branch 5 not taken.
360 (s += _) += ' ';
13 }
14
6/12
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 4 times.
✗ Branch 12 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
4 std::cout << kmp(' ' + p + ' ', ' ' + s + ' ').size() << '\n';
15 4 return 0;
16 4 }
17