F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_23921856_24671.cpp:1:41: error: stray '\312' in program
                                         Trie树
                                         ^
0_0_23921856_24671.cpp:1:41: error: stray '\367' in program
0_0_23921856_24671.cpp:3:1: error: stray '\314' in program
 题意:给你一些号码,问是否存在其中一个号码是另一个号码的前缀。
 ^
0_0_23921856_24671.cpp:3:1: error: stray '\342' in program
0_0_23921856_24671.cpp:3:1: error: stray '\322' in program
0_0_23921856_24671.cpp:3:1: error: stray '\342' in program
0_0_23921856_24671.cpp:3:1: error: stray '\243' in program
0_0_23921856_24671.cpp:3:1: error: stray '\272' in program
0_0_23921856_24671.cpp:3:1: error: stray '\270' in program
0_0_23921856_24671.cpp:3:1: error: stray '\370' in program
0_0_23921856_24671.cpp:3:1: error: stray '\304' in program
0_0_23921856_24671.cpp:3:1: error: stray '\343' in program
0_0_23921856_24671.cpp:3:1: error: stray '\322' in program
0_0_23921856_24671.cpp:3:1: error: stray '\273' in program
0_0_23921856_24671.cpp:3:1: error: stray '\320' in program
0_0_23921856_24671.cpp:3:1: error: stray '\251' in program
0_0_23921856_24671.cpp:3:1: error: stray '\272' in program
0_0_23921856_24671.cpp:3:1: error: stray '\305' in program
0_0_23921856_24671.cpp:3:1: error: stray '\302' in program
0_0_23921856_24671.cpp:3:1: error: stray '\353' in program
0_0_23921856_24671.cpp:3:1: error: stray '\243' in program
0_0_23921856_24671.cpp:3:1: error: stray '\254' in program
0_0_23921856_24671.cpp:3:1: error: stray '\316' in program
0_0_23921856_24671.cpp:3:1: error: stray '\312' in program
0_0_23921856_24671.cpp:3:1: error: stray '\312' in program
0_0_23921856_24671.cpp:3:1: error: stray '\307' in program
0_0_23921856_24671.cpp:3:1: error: stray '\267' in program
0_0_23921856_24671.cpp:3:1: error: stray '\361' in program
0_0_23921856_24671.cpp:3:1: error: stray '\264' in program
0_0_23921856_24671.cpp:3:1: error: stray '\346' in program
0_0_23921856_24671.cpp:3:1: error: stray '\324' in program
0_0_23921856_24671.cpp:3:1: error: stray '\332' in program
0_0_23921856_24671.cpp:3:1: error: stray '\306' in program
0_0_23921856_24671.cpp:3:1: error: stray '\344' in program
0_0_23921856_24671.cpp:3:1: error: stray '\326' in program
0_0_23921856_24671.cpp:3:1: error: stray '\320' in program
0_0_23921856_24671.cpp:3:1: error: stray '\322' in program
0_0_23921856_24671.cpp:3:1: error: stray '\273' in program
0_0_23921856_24671.cpp:3:1: error: stray '\270' in program
0_0_23921856_24671.cpp:3:1: error: stray '\366' in program
0_0_23921856_24671.cpp:3:1: error: stray '\272' in program
0_0_23921856_24671.cpp:3:1: error: stray '\305' in program
0_0_23921856_24671.cpp:3:1: error: stray '\302' in program
0_0_23921856_24671.cpp:3:1: error: stray '\353' in program
0_0_23921856_24671.cpp:3:1: error: stray '\312' in program
0_0_23921856_24671.cpp:3:1: error: stray '\307' in program
0_0_23921856_24671.cpp:3:1: error: stray '\301' in program
0_0_23921856_24671.cpp:3:1: error: stray '\355' in program
0_0_23921856_24671.cpp:3:1: error: stray '\322' in program
0_0_23921856_24671.cpp:3:1: error: stray '\273' in program
0_0_23921856_24671.cpp:3:1: error: stray '\270' in program
0_0_23921856_24671.cpp:3:1: error: stray '\366' in program
0_0_23921856_24671.cpp:3:1: error: stray '\272' in program
0_0_23921856_24671.cpp:3:1: error: stray '\305' in program
0_0_23921856_24671.cpp:3:1: error: stray '\302' in program
0_0_23921856_24671.cpp:3:1: error: stray '\353' in program
0_0_23921856_24671.cpp:3:1: error: stray '\265' in program
0_0_23921856_24671.cpp:3:1: error: stray '\304' in program
0_0_23921856_24671.cpp:3:1: error: stray '\307' in program
0_0_23921856_24671.cpp:3:1: error: stray '\260' in program
0_0_23921856_24671.cpp:3:1: error: stray '\327' in program
0_0_23921856_24671.cpp:3:1: error: stray '\272' in program
0_0_23921856_24671.cpp:3:1: error: stray '\241' in program
0_0_23921856_24671.cpp:3:1: error: stray '\243' in program
0_0_23921856_24671.cpp:4:1: error: stray '\313' in program
 思路:可以构建一棵trie树,如果x是y的前缀,那么有两种情况,一种是x先于y出现,那么y在插入trie树的过程中一定会经过x的尾节点,另一种是y先于x出现,那么y的尾节点插入trie树后,会发现其后面还有节点,即ch[u][i](i>=0 && i<=9)中的其中一个不为0。
 ^
0_0_23921856_24671.cpp:4:1: error: stray '\274' in program
0_0_23921856_24671.cpp:4:1: error: stray '\302' in program
0_0_23921856_24671.cpp:4:1: error: stray '\267' in program
0_0_23921856_24671.cpp:4:1: error: stray '\243' in program
0_0_23921856_24671.cpp:4:1: error: stray '\272' in program
0_0_23921856_24671.cpp:4:1: error: stray '\277' in program
0_0_23921856_24671.cpp:4:1: error: stray '\311' in program
0_0_23921856_24671.cpp:4:1: error: stray '\322' in program
0_0_23921856_24671.cpp:4:1: error: stray '\324' in program
0_0_23921856_24671.cpp:4:1: error: stray '\271' in program
0_0_23921856_24671.cpp:4:1: error: stray '\271' in program
0_0_23921856_24671.cpp:4:1: error: stray '\275' in program
0_0_23921856_24671.cpp:4:1: error: stray '\250' in program
0_0_23921856_24671.cpp:4:1: error: stray '\322' in program
0_0_23921856_24671.cpp:4:1: error: stray '\273' in program
0_0_23921856_24671.cpp:4:1: error: stray '\277' in program
0_0_23921856_24671.cpp:4:1: error: stray '\303' in program
0_0_23921856_24671.cpp:4:1: error: stray '\312' in program
0_0_23921856_24671.cpp:4:1: error: stray '\367' in program
0_0_23921856_24671.cpp:4:1: error: stray '\243' in program
0_0_23921856_24671.cpp:4:1: error: stray '\254' in program
0_0_23921856_24671.cpp:4:1: error: stray '\310' in program
0_0_23921856_24671.cpp:4:1: error: stray '\347' in program
0_0_23921856_24671.cpp:4:1: error: stray '\271' in program
0_0_23921856_24671.cpp:4:1: error: stray '\373' in program
0_0_23921856_24671.cpp:4:1: error: stray '\312' in program
0_0_23921856_24671.cpp:4:1: error: stray '\307' in program
0_0_23921856_24671.cpp:4:1: error: stray '\265' in program
0_0_23921856_24671.cpp:4:1: error: stray '\304' in program
0_0_23921856_24671.cpp:4:1: error: stray '\307' in program
0_0_23921856_24671.cpp:4:1: error: stray '\260' in program
0_0_23921856_24671.cpp:4:1: error: stray '\327' in program
0_0_23921856_24671.cpp:4:1: error: stray '\272' in program
0_0_23921856_24671.cpp:4:1: error: stray '\243' in program
0_0_23921856_24671.cpp:4:1: error: stray '\254' in program
0_0_23921856_24671.cpp:4:1: error: stray '\304' in program
0_0_23921856_24671.cpp:4:1: error: stray '\307' in program
0_0_23921856_24671.cpp:4:1: error: stray '\303' in program
0_0_23921856_24671.cpp:4:1: error: stray '\264' in program
0_0_23921856_24671.cpp:4:1: error: stray '\323' in program
0_0_23921856_24671.cpp:4:1: error: stray '\320' in program
0_0_23921856_24671.cpp:4:1: error: stray '\301' in program
0_0_23921856_24671.cpp:4:1: error: stray '\275' in program
0_0_23921856_24671.cpp:4:1: error: stray '\326' in program
0_0_23921856_24671.cpp:4:1: error: stray '\326' in program
0_0_23921856_24671.cpp:4:1: error: stray '\307' in program
0_0_23921856_24671.cpp:4:1: error: stray '\351' in program
0_0_23921856_24671.cpp:4:1: error: stray '\277' in program
0_0_23921856_24671.cpp:4:1: error: stray '\366' in program
0_0_23921856_24671.cpp:4:1: error: stray '\243' in program
0_0_23921856_24671.cpp:4:1: error: stray '\254' in program
0_0_23921856_24671.cpp:4:1: error: stray '\322' in program
0_0_23921856_24671.cpp:4:1: error: stray '\273' in program
0_0_23921856_24671.cpp:4:1: error: stray '\326' in program
0_0_23921856_24671.cpp:4:1: error: stray '\326' in program
0_0_23921856_24671.cpp:4:1: error: stray '\312' in program
0_0_23921856_24671.cpp:4:1: error: stray '\307' in program
0_0_23921856_24671.cpp:4:1: error: stray '\317' in program
0_0_23921856_24671.cpp:4:1: error: stray '\310' in program
0_0_23921856_24671.cpp:4:1: error: stray '\323' in program
0_0_23921856_24671.cpp:4:1: error: stray '\332' in program
0_0_23921856_24671.cpp:4:1: error: stray '\263' in program
0_0_23921856_24671.cpp:4:1: error: stray '\366' in program
0_0_23921856_24671.cpp:4:1: error: stray '\317' in program
0_0_23921856_24671.cpp:4:1: error: stray '\326' in program
0_0_23921856_24671.cpp:4:1: error: stray '\243' in program
0_0_23921856_24671.cpp:4:1: error: stray '\254' in program
0_0_23921856_24671.cpp:4:1: error: stray '\304' in program
0_0_23921856_24671.cpp:4:1: error: stray '\307' in program
0_0_23921856_24671.cpp:4:1: error: stray '\303' in program
0_0_23921856_24671.cpp:4:1: error: stray '\264' in program
0_0_23921856_24671.cpp:4:1: error: stray '\324' in program
0_0_23921856_24671.cpp:4:1: error: stray '\332' in program
0_0_23921856_24671.cpp:4:1: error: stray '\262' in program
0_0_23921856_24671.cpp:4:1: error: stray '\345' in program
0_0_23921856_24671.cpp:4:1: error: stray '\310' in program
0_0_23921856_24671.cpp:4:1: error: stray '\353' in program
0_0_23921856_24671.cpp:4:1: error: stray '\312' in program
0_0_23921856_24671.cpp:4:1: error: stray '\367' in program
0_0_23921856_24671.cpp:4:1: error: 


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 19:26:23, Gzip enabled