ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1307. Archiver

My brand new compression algorithm.
Posted by Michael Rybak (accepted@ukr.net) 15 Feb 2006 08:35
Check out the brand new compression algorithm I've invented exclusively for this problem. Please don't tell anyone about it till I have protected my copyright.

Since it's not allowed to post AC code (and in this case, probably, even the output of AC code), I'll only post the first several lines of output:

Input:
For your informtaion: this algorithm works fine for this problem

Output:
//CPP
#include<iostream>
char b[4]="or";
char s[1<<18]="F$ your inf$mtaion: this alg$ithm w$ks fine f$ this problem>";
[..]

P.S. Make sure you keep the secret.

Edited by author 15.02.2006 08:36
Re: My brand new compression algorithm.
Posted by GaLL 15 Feb 2006 13:39
That's not new algo. I guess many programmers used it successfully. But AC by only replacing "or" => '$' is almost amazing.
Nope, it's not replacing "or" => "$" (+)
Posted by Michael Rybak (accepted@ukr.net) 15 Feb 2006 18:27
It's much more sophisticated, I'm telling you, that's my brand new algo!
OMG, you win! Replacing "or" => "$" gets AC too!!! (-)
Posted by Michael Rybak (accepted@ukr.net) 15 Feb 2006 22:03
-
Frequency table
Posted by Fyodor Menshikov 10 May 2007 01:51
http://www.math.cornell.edu/~mec/2003-2004/cryptography/subs/digraphs.html

This table says that most frequent digraph is 'th'.

Used above digraph 'or' 3 times less frequent.
Re: My brand new compression algorithm.
Posted by Fyodor Menshikov 20 May 2007 16:25
Replacing ends of lines (CR LF) by 1 character is enough! The template for unpack program is only 160 bytes long including indentation and blank lines!
Re: My brand new compression algorithm.
Posted by AlMag 22 May 2007 20:14
In what way can I change, for example "or"?
I'm new one in C++. Can you tell me?
Re: My brand new compression algorithm.
Posted by AlMag 22 May 2007 23:35
I understood. But how to be with new lines?
I cann't write
string s="a
b";
with original
a
b
Re: My brand new compression algorithm.
Posted by AlexF [USTU] 22 May 2007 23:56
It's "a\nb"
Re: My brand new compression algorithm.
Posted by AlMag 23 May 2007 00:13
Oh... I thought I could only use it with printf...
Re: My brand new compression algorithm.
Posted by KIRILL(ArcSTU) 23 May 2007 01:41
I think "a☺b" better:)
Re: Frequency table
Posted by partisan (Andrey Korotkov) 17 Dec 2007 16:59
There is also such combination: ", ". Recommendation: use C++ for archive: here we can write string in one line. Delphi also compile such code, but free pascal (2.0.4) doesn't!