ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1517. Freedom of Choice

About this problem
Posted by andreyDagger 4 Oct 2021 16:20
This is painful problem, I spent 3 hours to solve, but very educational actually. If you are struggling, than read this: https://codeforces.com/topic/60789/ru9
About this problem
Posted by Dmi3Molodov 20 Dec 2024 00:02
See https://en.wikipedia.org/wiki/Bloom_filter
This made it possible to achieve 0.078 seconds at 3 megabytes. In fact, the "optimal" filter memory is only slightly larger than the total memory for storing two entered strings (300 kilobytes).

Смотри также https://ru.wikipedia.org/wiki/%D0%A4%D0%B8%D0%BB%D1%8C%D1%82%D1%80_%D0%91%D0%BB%D1%83%D0%BC%D0%B0
Это позволило добиться 0.078 секунд при 3 мегабайтах. На самом деле "оптимальная" память фильтра лишь немногим больше чем общая память для хранения двух введённых строк (300 килобайт).