题目链接:https://vjudge.net/contest/158125#problem/A 题意: 系统中,strcmp函数是这样执行的,给定 n 个字符串,求两两比较时,strcmp函数要比较多少次? 如: t h a n \n t h e r e \n t h a t \n t h e \n 2 2 2 1 2 2 2 1 直接两两比较是超时的. 可以这样建立一个字典树: 可以发现一直要比较到交…
Phone List Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16341 Accepted: 5228 Description Given a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let's say the phone catalogu…