947 - Master Mind Helper

All about problems in Volume 9. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
ayon
Experienced poster
Posts: 161
Joined: Tue Oct 25, 2005 8:38 pm
Location: buet, dhaka, bangladesh

947 - Master Mind Helper

Post by ayon » Mon Oct 30, 2006 1:23 am

i am a little bit confused. say secret code is 6678 and our guess is 6797.
now clearly correct color in correct position is 1 (thats the 1st 6), but what about correct color in wrong position? is it 1 or 2? there are two 7 in our guess.
ishtiak zaman
----------------
the world is nothing but a good program, and we are all some instances of the program

ayon
Experienced poster
Posts: 161
Joined: Tue Oct 25, 2005 8:38 pm
Location: buet, dhaka, bangladesh

Post by ayon » Mon Oct 30, 2006 1:35 am

oh, i got it, the answer should be 1. i send code assuming both two cases, but got ac using the case where one digit of secret code can engage only one digit of guess code. by the way, for both two cases sample i/o were correct.
ishtiak zaman
----------------
the world is nothing but a good program, and we are all some instances of the program

shakil
Learning poster
Posts: 74
Joined: Sat Jul 15, 2006 6:28 am
Location: CUET , bangladesh
Contact:

Re: 947 - Master Mind Helper

Post by shakil » Fri Mar 05, 2010 3:51 pm

I think this problem is similar of 296. But i do not understood the output of: 567 0 1 & 91543 0 5.
How the output will be 234 & 44.
My program gave output 216 & 1024.
Please, any one discuss how output is 44 for 91543 0 5 ?
SHAKIL

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 947 - Master Mind Helper

Post by brianfry713 » Wed Feb 15, 2012 10:53 pm

For input 567 0 1, here are the 234 possible secret codes:

Code: Select all

611
711
621
721
631
731
641
741
151
251
351
451
851
951
171
271
371
471
771
871
971
681
781
691
791
612
712
622
722
632
732
642
742
152
252
352
452
852
952
172
272
372
472
772
872
972
682
782
692
792
613
713
623
723
633
733
643
743
153
253
353
453
853
953
173
273
373
473
773
873
973
683
783
693
793
614
714
624
724
634
734
644
744
154
254
354
454
854
954
174
274
374
474
774
874
974
684
784
694
794
115
215
315
415
815
915
125
225
325
425
825
925
135
235
335
435
835
935
145
245
345
445
845
945
155
255
355
455
855
955
185
285
385
485
885
985
195
295
395
495
895
995
116
216
316
416
616
816
916
126
226
326
426
626
826
926
136
236
336
436
636
836
936
146
246
346
446
646
846
946
186
286
386
486
686
886
986
196
296
396
496
696
896
996
618
718
628
728
638
738
648
748
158
258
358
458
858
958
178
278
378
478
778
878
978
688
788
698
798
619
719
629
729
639
739
649
749
159
259
359
459
859
959
179
279
379
479
779
879
979
689
789
699
799
For input 91543 0 5 here are the 44 possible secret codes:

Code: Select all

59431
54931
45931
49351
39451
43951
34951
54391
45391
53491
35491
59314
53914
35914
59134
15934
39154
19354
13954
53194
35194
15394
49315
39415
43915
34915
49135
19435
14935
43195
34195
14395
13495
54319
45319
53419
35419
54139
45139
15439
43159
34159
14359
13459
Check input and AC output for thousands of problems on uDebug!

Post Reply

Return to “Volume 9 (900-999)”