To be honest there is little to no escape until codeforces provides a editor and we can submit code from there only along with disabling copy paste of problem statement from website and pasting any external codes/text is also not allowed (if possible i am not a web dev expert but i have seen it on platforms like hackerrank).
(in coding ninjas problem of the day interface you cannot paste any external code/text) (leetcode does video monitoring in its contests but again that is possible only because they provide their own editor)
I am not providing a sol for plag check but i think prevention is better than cure. since plag check may have some false positives and there will always be a dilemma whether to punish user or consider it as warning.




