ACAutomaton_test.cpp 243 B

12345678910111213141516
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #include "ACAutomaton.cpp"
  4. Trie ac;
  5. int main() {
  6. ac.init();
  7. ac.insert("hel");
  8. ac.insert("llo");
  9. ac.insert("world");
  10. ac.build();
  11. assert(ac.query("hello world !") == 3);
  12. return 0;
  13. }