-
Notifications
You must be signed in to change notification settings - Fork 1
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Критерий - дублирование кода #16
Comments
Думал сейчас над реализацией этого всего. В общем, мне кажется, что проверки на списывание на всяких codeforces используют следующий алгоритм:
Алгоритм несложный, но проблема в том, что в нашем случае мы не знаем, какие части кода нужно сравнивать. Сравнивать всё подряд это тупо, неинтересно и дорого. Если упростить эту задачу до сравнения "внутренностей" конструкций |
Пример:
Очевидно, что половина кода дублируется и можно переписать в:
Можно еще улучшить и сократить этот код, но избежания явного дублирования кода в if-else и switch-case уже достаточно.
The text was updated successfully, but these errors were encountered: