1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * @uni_kakurenbo
 * https://github.com/uni-kakurenbo/competitive-programming-workspace
 *
 * CC0 1.0  http://creativecommons.org/publicdomain/zero/1.0/deed.ja
 */
/* #language C++ 20 GCC */

#define PROBLEM "https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_6_C"

#include <ranges><--- Include file:  not found. Please note: Cppcheck does not need standard library headers to get proper results.

#include "adaptor/io.hpp"
#include "adaptor/multi_container.hpp"
#include "view/repeat.hpp"
#include "iterable/operation.hpp"

signed main() {
    uni::multi_container<uni::i32, 3> cnt(4, 3, 10);

    uni::i32 n; input >> n;

    REP(i, n) {
        uni::i32 b, f, r, v; input >> b >> f >> r >> v; --b, --f, --r;
        cnt[b][f][r] += v;
    }

    REP(i, 4) {
        ITR(v, cnt[i]) print << " ", print(v);
        if(i < 3) print(uni::join(uni::views::repeat('#') | std::views::take(20)));
    }
}