题目传送门:http://poj.org/problem?id=1903
中文题面:《算法竞赛·入门经典·训练指南》P57
对于每一个字符串,不难将其转化为26维的0/1向量
于是求一个线性基就可以辣!
当然不会线性基该怎么搞?
白书上面给了一个很常用、实用的方法:
将向量分成两组,组内暴力
然后组间使用map来支持查询即可
题目传送门:http://poj.org/problem?id=1903
中文题面:《算法竞赛·入门经典·训练指南》P57
对于每一个字符串,不难将其转化为26维的0/1向量
于是求一个线性基就可以辣!
当然不会线性基该怎么搞?
白书上面给了一个很常用、实用的方法:
将向量分成两组,组内暴力
然后组间使用map来支持查询即可
好文章!666,学习了
It¦s really a nice and helpful piece of info. I¦m satisfied that you just shared this helpful info with us. Please stay us up to date like this. Thanks for sharing.
Excellent read, I just passed this onto a friend who was doing a little research on that. And he just bought me lunch since I found it for him smile Thus let me rephrase that: Thanks for lunch!