Page 1 of 2

11286 - Conformity

Posted: Mon Oct 01, 2007 4:52 pm
by nymo
What is the best data structure in this problem to look for duplication? I don't know STL stuff, I only know basic C code... Any suggestion is welcome.

Posted: Mon Oct 01, 2007 7:31 pm
by sclo
study stl map and vector

Posted: Mon Oct 01, 2007 8:00 pm
by ayon
stl is very useful for this problem, though i used Trie as the data structure

Posted: Tue Oct 02, 2007 12:23 pm
by sapnil
Use stracture with array and then sort the array in dictionary order,then
search.
This is needed for solving this problem.

Thanks
Keep posting
Sapnil

Thanks...

Posted: Tue Oct 02, 2007 2:23 pm
by nymo
I thought of trie, too. I 'll try to implement this. to sclo, thanks for this suggestion. I will try map, vector and other STL stuff. thanks all for helping me.

Posted: Fri Oct 05, 2007 12:12 pm
by nymo
I get WA for this problem, due to the current status of the new server, I don't know whether it is really WA or other errors shown as WA. I 've tried some test cases and got correct answer. I 've tried to implement a trie. Can you people help me? thanks.
[EDIT] I misunderstood the problem, ACC now. I 've implemented trie. thanks all.

asd

Posted: Mon Oct 08, 2007 11:19 am
by darkos32
hi,i got WA...can anyone give me the testcase please ?



thanks.

Posted: Tue Oct 09, 2007 8:03 am
by sapnil
Try this case
Hope it will works

Code: Select all

Input:
4
100 101 102 103 104
104 103 100 101 102
200 201 202 203 204
204 203 200 201 202
5
100 101 102 103 104
100 101 102 103 104
100 101 102 103 104
100 101 102 103 104
100 101 102 103 104
5
100 101 102 103 104
100 101 102 103 104
100 101 102 103 104
100 101 102 103 104
100 101 102 103 105
Output:
2
0
4
Thanks
Keep posting
Sapnil

Posted: Tue Oct 09, 2007 9:35 am
by mmonish
>>sapnil
r u sure that these outputs r correct??
My AC code gives the following output.

Code: Select all

4
5
4

asd

Posted: Tue Oct 09, 2007 11:06 am
by darkos32
emm..which is the answer ?

now my code give me :

Code: Select all

4
5
4
but still got WA...any testcase again ?
does 0 is an input ?



thanks..

Posted: Tue Oct 09, 2007 11:26 am
by darkos32
i know now,my array size is too small...but now i got TLE...

Posted: Wed Oct 17, 2007 1:29 pm
by sapnil
vgjgfjg

Posted: Wed Oct 17, 2007 1:33 pm
by sapnil
>>sapnil
r u sure that these outputs r correct??
My AC code gives the following output.

Code: Select all

4 
5 
4
To mmonish

Yes me AC code returns this output!

Thanks
Keep posting
Sapnil

Re: 11286 - Conformity

Posted: Fri Jun 24, 2011 2:04 pm
by Shafaet_du
Read the data as strings,sort them,concatanate them placing separators in middle. than use map. simple

Re: 11286 - Conformity

Posted: Fri Feb 07, 2014 9:31 am
by uDebug
Here's some input / output I found useful during testing / debugging.

Input:

Code: Select all

3
100 101 102 103 488
100 200 300 101 102
103 102 101 488 100
3
200 202 204 206 208
123 234 345 456 321
100 200 300 400 444
10
100 200 300 400 444
444 100 200 300 400 
100 300 400 444 200
100 200 400 444 300
100 444 200 300 400 
111 222 333 444 455
222 333 444 455 111
222 333 455 111 444
455 111 222 333 444 
111 222 444 455 333
16
100 200 300 400 444
444 100 200 300 400 
100 300 400 444 200
100 200 400 444 300
100 444 200 300 400 
111 222 333 444 455
222 333 444 455 111
222 333 455 111 444
455 111 222 333 444 
111 222 444 455 333
123 321 222 333 444
444 123 321 222 333 
321 123 222 333 444
222 123 321 333 444
333 123 321 222 444
123 444 321 222 333 
4
123 222 388 488 188
299 222 388 488 188
466 299 222 388 488
466 299 222 388 450
0
AC Output:

Code: Select all

2
3
10
6
4