esicodehub-ai / test_phase4.py
WissalllK's picture
Add ESIcodeHub AI detection service
a937307
raw
history blame contribute delete
751 Bytes
from phase4 import explainer as p4
p4._load_all_keys()
from orchestrator import detect, build_report
p4._load_all_keys()
ai_py = """
import sys
from collections import Counter
from typing import List
def solve(arr: List[int]) -> int:
\"\"\"Find the maximum frequency of any element in the array.\"\"\"
if not arr:
return 0
return max(Counter(arr).values())
def main() -> None:
data = sys.stdin.read().split()
idx = 0
t = int(data[idx]); idx += 1
for _ in range(t):
n = int(data[idx]); idx += 1
arr = list(map(int, data[idx:idx+n])); idx += n
print(solve(arr))
if __name__ == "__main__":
main()
"""
result = detect(ai_py, language="python", explain=True)
print(build_report(result))