Beep Beep Beep

Back to General discussions forum

CSFPython     2023-01-14 19:16:06

Rodion, Thanks for another excellent and entertaining problem.

I think there is some ambiguity in deciding precisely how to interpret the start and end parts of the waveform. The example shown in the question does not suffer from this ambiguity but some of the data sets do. When there are only small parts of a pulse at the start and end I find myself wondering what will count as a pulse and what will be ignored.

Your checker helpfully provides a data set which fails but then does not give the expected answer for that data set. This would certainly help in deciding how the checker determines whether to count something as a pulse or to ignore it.

This is a very minor critiscism and it didn't affect me very much. Nevertheless, others may find the extra information useful.

An alternative and better approach would be to give an expected answer alongside the block of 1000 or so data items that are provided for practice. These data blocks were helpful but there is no way of telling whether or not the proposed answer would be accepted.

zelevin     2023-01-15 02:43:11

I second Clive's suggestion. It's not quite clear how to behave with regard to partial trailing beeps.

Rodion (admin)     2023-01-15 05:27:01
User avatar

Hi Friends!

By now the checker should not insist on precise last bit or its existence at all, but I somewhat missed to try taking similar care about the start... Let me try to improve this in some minutes so we can see if it is better.

(if it won't help I guess we can disclose full failing sequence from start to end, but necessity of fitting to those start/end conditions would be dull and annoying for solver probably, so it would be great if it can be avoided)

Sorry for this inconvenience and thanks a lot for quick feedback!

UPD I think it's ready, please retry! I reviewed the expected patterns and changed condition to "if expected pattern is substring of the answer and their lengths do not differ greatly" - hopefully it would be fine unless there is mistake in any of the patterns.

zelevin     2023-01-15 05:56:02

I still get the same response. If it were possible to include the expected output along with the data that is solved incorrectly, as Clive suggests, this might make the precise nature of the error clearer.

Rodion (admin)     2023-01-15 06:04:37
User avatar

It's possible but as there are only 10 fixed datasets one can solve the problem with 10 attempts :)

Let me few minutes to review how your solution behaves and perhaps we'll get idea of improving the checker further...

UPD

Your code quite impresses me with its brevity! And since it gives 9 of 10 correct results, I thought let's checker allow to ignore single wrong result. Really the problem is about the idea, not that much about precise guessing testcases...

UPD2

Erroneous run yields 11101111011 instead of 01101111011. The data start like this:

711 721 730 738 738 733 727 721 721 723 727 731 732 738 740 725 712 706 713 730 745 755 747 719 716 696 696 740 740 761 768 719 716 701 679 729 742 751 778 736 712 708 676 708 744 745 773 759 715 711 687 687 736 743 763 765 731 712 692 696 717 740 761 756 732 719 711 715 725 734 741 740 734 728 723 722 725 729 733 734 734 732 728 726 727 729 732 734 735 735 730 726 724 725 729 734 736 735 731 725 722 722 727 734 738 738 733 726 721 720 724 731 737 738 734 727 722 721 724 729 735 737 734 729 725 723 725 728 732 734 732 729 727 726 727 728 730 731 731 730 729 729 729 729 730 730 731 740 740 725 715 710 718 734 748 758 742 718 718 692 706 743 741 768 761 716 717 695 687 738 743 759 779 728 716 707 678 721 747 752 780 752 716 712 684 700 743 747 770 762 729 711 693 702 723 747 765 754 731 720 712 718 728 736 742 740 734 727 723 723 726 731 734 736 743 740 724 714 710 721 738 751 759 740 718 716 689 710 743 742 771 755 715 717 692 689 741 742 762 775 724 714 702 676 726 743 751 778 743 712 708 680 703 743 747 770 757 726 707 691 702 723 747 763 749 727 716 710 717 727 736 741 738 732 726 722 723 726 730 733 734 742 736 720 710 707 720 736 750 757 735 716 713 686 714 742 742 772 749 713 714 686 693 741 741 764 772 719 715 699 679 730 744 755 780 740 713 707 678 709 743 747 771 753 723 704 689 703 724 748 762 746 725 714 709 717 726 735 739 736 730 723 720 721 724 729 731 732 731 727 724 723 724 727 730 731 732 729 725 722 721 724 729 732

example of waveform with bits transfer

zelevin     2023-01-15 06:26:06

Thank you so much! I'll actually try to fix this without relying on the kindness of the checker. :)

gardengnome     2023-01-15 12:50:17
User avatar

Q: What does "Result contains something more than zeroes and ones" mean when the output / answer was "0111001000"? Confused.

Rodion (admin)     2023-01-15 14:33:39
User avatar

It's verbatim :) Judging by your code it adds newline after each bit, probably it was meant to be followed by semicolon to prevent this

print "0";

Result however is at least trimmed by checker so trailing newline(s) shouldn't harm.

Please login and solve 5 problems to be able to post at forum