def fix_cpp_includes()

in src/open_r1/utils/competitive_programming/code_patcher.py [0:0]


def fix_cpp_includes(source_code):
    # has most of the useful functions
    code_header = "#include <bits/stdc++.h>\n"
    # use namespace std since models forget std:: often
    if "using namespace std;" not in source_code and "std::" not in source_code:
        code_header += "\nusing namespace std;\n\n"
    return code_header + source_code