/visma-shortest-code-contest-2nd-edition

Solve the C++ challenge using the shortest amount of code (what is known as codegolf).

Primary LanguageC++

visma-shortest-code-contest-2st-edition (December 2016)

Solve the C++ challenge using the shortest amount of code (what is known as codegolf).

The challenge

Write a C++ program that generates this text file: arecibo.txt

My 394 characters solution

same 3rd place 🥉 as in 1st edition

#include<fstream>
std::ofstream f("arecibo.txt");int i,j;int main(){for(auto s=U"RШʪЬࢰӚ૒Ռ(((ب+Ȩ+Ȩ-Ȩ/ب((ౠـࠨƸീق࿦ࠇ((Ĩ*((¨)ྨG((ౘ݀࠰8ഴς࿦ࠇ((ī*+(«)ྫG+(ȩ,ī0ë8Y�+ƨY�ë8Ī0ȫ,Ы,Щ0Ȫ8Ĩ�èƨɢبȪ(ȷШȿʃOŧய_-cȭgȭXȵШ((Ϊ(ϐսΨż(Ũ7ШgܨĈǨƨ�ͨØڈǀѸʰѰҰm¨j¨h¨:Ш߇ʠ";s[i];++i%2||f<<"\n")for(j=11-i%2;~j;f<<(s[i]-40>>j--&1));}




15137676_665995730242754_7454082262766412519_o