MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / main

Function main

Data Structures/Persistent Array.cpp:88–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86};
87
88int32_t main(){
89 ios_base::sync_with_stdio(0);
90 cin.tie(0);
91 int q; cin >> q;
92 PersistentQueue<int> Q(q + 1);
93 while (q--) {
94 int ty; cin >> ty;
95 if (ty == 0) {
96 int id, x; cin >> id >> x;
97 Q.push(id + 1, x);
98 }
99 else {
100 int id; cin >> id;
101 cout << Q.pop(id + 1) << '\n';
102 }
103 }
104}
105// https://judge.yosupo.jp/problem/persistent_queue

Callers

nothing calls this directly

Calls 2

pushMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected