Double Parity Vertical Redundancy Check

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Take in a set of Binary bytes with parity bits with a single incorrect bit, determine which bit is incorrect and output the binary bytes with the correction.

0100100|0
1101110|1
0101101|0
1111101|0
¯¯¯¯¯¯¯|¯
0011010|1

The outer numbers are the parity bits.

http://en.wikipedia.org/wiki/Parity_bit

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

01001000
00110011
00011010
10001101
11000110
01111000
00010010

Sample output:

01001000
00110011
01011010
10001101
11000110
01111000
00010010

Sample input:_

01001000
00110011
01011010
10001101
11000110
01111000
10000001
11000111
01101111
00110011

Sample output:

01001000
00110011
01011010
10001101
11000110
01111000
10000001
11001111
01101111
00110011

Sample input:_

01010110
10110100
01011001
11101101
01110111
01001011
10010000
11110011
01110110
10110100
01011001
11101101
01110111
01001011
10010000
11110011
01110111
10110100
00011000
00101101
00110110
01011001
11111001
01000001

Sample output:

01010110
10110100
01011001
11101101
01110111
01001011
10010000
11110011
01110111
10110100
01011001
11101101
01110111
01001011
10010000
11110011
01110111
10110100
00011000
00101101
00110110
01011001
11111001
01000001

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1ozy4dm290.22072008/09/11 10:43:481B / 11B / 15B
2murky-satyr290.19672008/09/11 10:52:241B / 11B / 15B
3eban290.08702008/09/11 11:26:281B / 12B / 14B
4leonid (embed)290.06502008/09/11 12:26:411B / 10B / 16B
5flagitious580.10702008/09/13 00:17:400B / 35B / 23B
6leonid670.19382008/09/19 23:35:120B / 31B / 36B
7tabasa2460.20832008/09/11 14:24:2310B / ?B / ?B

Perl _

RankUserSizeTimeDateStatistics
1vandread1500.12182008/09/18 00:15:490B / 53B / 96B

Python _

RankUserSizeTimeDateStatistics
1recursive1740.13202008/09/16 06:37:320B / 101B / 57B
2recursive1670.13912008/10/06 14:42:380B / 99B / 55B

PHP _

RankUserSizeTimeDateStatistics
1pooq700.42742008/10/05 21:23:280B / 42B / 28B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima(embed)910.34512008/09/11 11:17:190B / 55B / 26B
2kozima1700.15202008/09/11 09:05:080B / 115B / 48B
3kozima(embed)890.34522008/10/04 10:19:120B / 54B / 26B

Io _

RankUserSizeTimeDateStatistics
1pooq680.25402012/11/25 08:03:361B / 54B / 9B

JavaScript _

RankUserSizeTimeDateStatistics
1nn750.06892008/09/13 20:06:230B / 52B / 23B
2murky-satyr770.10592008/09/13 18:14:510B / 42B / 33B
3nn700.04582008/09/25 17:56:400B / 38B / 30B

Lua _

RankUserSizeTimeDateStatistics
1pooq680.10242008/09/14 09:34:070B / 37B / 31B

BASIC _

RankUserSizeTimeDateStatistics
1pooq1000.06992008/09/14 08:06:210B / 58B / 30B

J _

RankUserSizeTimeDateStatistics
1pooq330.74322008/09/14 01:55:350B / 15B / 16B

C _

RankUserSizeTimeDateStatistics
1ozy4dm520.05032008/09/11 18:28:521B / 25B / 24B
251b570.07032008/09/11 20:04:441B / 27B / 28B
3 51b960.33862008/09/11 17:31:230B / 44B / 52B

Haskell _

RankUserSizeTimeDateStatistics
1notogawa1130.31462008/09/12 00:17:230B / ?B / ?B

C# _

RankUserSizeTimeDateStatistics
1ASAQ1470.46232008/09/21 03:53:100B / ?B / ?B
2Paul2160.53202008/09/11 11:27:340B / ?B / ?B
3Hex2720.67342008/09/12 07:55:500B / ?B / ?B

AWK _

RankUserSizeTimeDateStatistics
1nn530.04442008/09/17 11:30:370B / 34B / 17B
2nn410.00112009/11/29 10:46:400B / 24B / 17B

sed _

RankUserSizeTimeDateStatistics
1GeoJ310.04482008/09/21 03:23:050B / 18B / 11B
2eban620.07302008/09/11 10:38:110B / 51B / 9B
3GeoJ (formal)910.13492008/09/21 04:08:430B / 33B / 47B

Postscript _

RankUserSizeTimeDateStatistics
1yshl(bin)481.26012008/09/11 18:23:2922B / 23B / 3B
2yshl771.26342008/09/11 18:20:541B / 57B / 8B
3yshl(not embed)(bin)1051.17502008/09/11 20:19:1451B / 30B / 23B
4yshl(not embed)2041.14132008/09/11 20:19:030B / 154B / 20B

GolfScript _

RankUserSizeTimeDateStatistics
1Mark Byers220.24712009/10/11 21:11:241B / 8B / 13B

z80 _

RankUserSizeTimeDateStatistics
1kodera450.49502008/09/11 23:00:2030B / 7B / 5B

Vim _

RankUserSizeTimeDateStatistics
1nn190.07002009/11/29 10:55:101B / 15B / 3B

goruby _

RankUserSizeTimeDateStatistics
1murky-satyr240.81052008/09/16 12:15:321B / 13B / 8B
2leonid270.38612008/09/11 17:11:341B / 13B / 12B
3eban300.88742008/09/11 17:24:040B / 13B / 15B
4murky-satyr220.08852009/12/22 15:45:031B / 11B / 8B

Groovy _

RankUserSizeTimeDateStatistics
1murky-satyr6411.65092008/09/25 05:36:361B / 37B / 23B
2nn6510.84282008/09/25 00:53:230B / 38B / 26B
3murky-satyr6311.76982008/11/19 11:15:501B / 36B / 23B

Language Ranking_

RankLangUserSizeScore
1Vimnn1910000
2GolfScriptMark Byers228636
3gorubymurky-satyr228636
4Rubyozy4dm296551
5sedGeoJ316129
6Jpooq335757
7AWKnn414634
8z80kodera454222
9Postscriptyshl(bin)483958
10Cozy4dm523653
11Groovymurky-satyr633015
12Luapooq682794
13Iopooq682794
14JavaScriptnn702714
15PHPpooq702714
16Common LISPkozima(embed)892134
17BASICpooq1001900
18Haskellnotogawa1131681
19C#ASAQ1471292
20Perlvandread1501266
21Pythonrecursive1671137

return to the top page