Skip to content

Commit 5b73e2a

Browse files
committed
binary-trie fixed test
1 parent c1e28a6 commit 5b73e2a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cpp/binary-trie.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ template <unsigned int d> class BinaryTrie {
122122
* @note nがtrie木のサイズ以上な場合、assert
123123
*/
124124
unsigned long long nth_element(unsigned int n) const {
125-
assert(n < (int)size());
125+
assert((int)n < size());
126126
unsigned long long ret = 0;
127127
NodePtr cur_ptr = root_ptr;
128128
while (!cur_ptr->is_leaf()) {

test/aoj-itp1-1-a.binary-trie.test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ int main(void) {
4141
BT.insert(x);
4242
break;
4343
case 1:
44-
A.erase(std::remove_if(A.begin(), A.end(), [&](int a) { return a == x; }), A.end());
44+
A.erase(std::remove_if(A.begin(), A.end(), [&](unsigned long long a) { return a == x; }), A.end());
4545
BT.erase(x);
4646
break;
4747
case 2:
@@ -65,10 +65,10 @@ int main(void) {
6565
assert(A[x] == BT.nth_element(x));
6666
break;
6767
case 6:
68-
assert(std::count(A.begin(), A.end(), x) == BT.count(x));
68+
assert((int)std::count(A.begin(), A.end(), x) == BT.count(x));
6969
break;
7070
case 7:
71-
assert(A.size() == BT.size());
71+
assert((int)A.size() == BT.size());
7272
default:
7373
break;
7474
}

0 commit comments

Comments
 (0)