Skip to content

Commit

Permalink
div 修正
Browse files Browse the repository at this point in the history
  • Loading branch information
potato167 committed Jun 22, 2024
1 parent e27b0ec commit 7ff72cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fps/FPS_division.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ template<class T>
// |res.second| <= |g| - 1
std::pair<std::vector<T>, std::vector<T>>
FPS_division(std::vector<T> f, std::vector<T> g){
assert(!f.empty() && f.back() != 0);
while (!f.empty() && f.back() == 0) f.pop_back();
assert(!f.empty());
assert(!g.empty() && g.back() != 0);
if (f.size() < g.size()){
return {{}, f};
Expand Down

0 comments on commit 7ff72cf

Please sign in to comment.