Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

71%
+3 −0
Challenges Guess the language! (Cops' Thread)

C or C++ (gcc) 220 bytes, cracked by Razetime %: %: define cops(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) if(not false and k%:%:f%:%:d%:%:l(& (not true) <:%:i%:j%:k%:l" "%:m" "%:n%:o%:p%:...

posted 3y ago by Lundin‭  ·  edited 3y ago by Lundin‭

Answer
#2: Post edited by user avatar Lundin‭ · 2021-08-06T18:02:40Z (over 3 years ago)
  • # [???], 222 bytes
  • ```
  • %:
  • %: define cops(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) if(not false and k%:%:f%:%:d%:%:l(& (not true) <:%:i%:j%:k%:l" "%:m" "%:n%:o%:p%:q%:r%:s%:t:> ))<%%>
  • %:
  • main()<%cops(w,h,a,t,s,u,p,?,C,o,p,s,and,R,o,b,b,e,r,s)%>
  • ```
  • Output:
  • ```
  • Cops and Robbers
  • ```
  • # C or C++ (gcc) 220 bytes, [cracked by Razetime](https://codegolf.codidact.com/posts/283157#answer-283157)
  • <!-- language-all: lang-c -->
  • %:
  • %: define cops(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) if(not false and k%:%:f%:%:d%:%:l(& (not true) <:%:i%:j%:k%:l" "%:m" "%:n%:o%:p%:q%:r%:s%:t:> ))<%%>
  • %:
  • main()<%cops(w,h,a,t,s,u,p,?,C,o,p,s,and,R,o,b,b,e,r,s)%>
  • [Try it online!][TIO-ks0n7j8o]
  • [C (gcc)]: https://gcc.gnu.org/
  • [TIO-ks0n7j8o]: https://tio.run/##ZY5BasMwEEX3PsWQMsWG365KFoNxF71Bb2BLcqJElhxLJsd3xt50UQY@M48P88zHxZjtzUcTVuuo9Tmdv86f1676Y7lYn/6hIaWgcGOpWMi60UdHJs257jHAwMJhxAVXeNxwR8CEiIQZDyzIKA35sY6p0NiH7KiPlu4sLOMedo9Qv9PRKMvqGmoVeZYbi/bCiU4s05GRJbHMLA@WhSWzFOmoaVrmTuWqqfex1uuwe6pRj6IGq7p84@dwytD/@NV90HG7YcPdtr0A "C (gcc) – Try It Online"
  • Output:
  • ```
  • Cops and Robbers
  • ```
  • Some explanation/de-obfuscation:
  • - `%:` is a digraph equivalent to `#`. `<%` and `%>` are digraph equivalents to `{` and `}`. `<:` and `:>` are digraph equivalents to `[` and `]`.
  • - `#` on an empty line is allowed but does nothing.
  • - `not` and `and` are alternative operators from iso646.h here used to make it look more like other languages. The boolean stuff is mostly there to confuse.
  • - Using stringification # and token concatenation ##, the macro expands to:
  • `if(!false and puts(&[not true]"Cops and Robbers")<%%>`
  • - Removing obfuscation this is basically just `puts("Cops and Robbers")`.
#1: Initial revision by user avatar Lundin‭ · 2021-08-05T18:17:37Z (over 3 years ago)
# [???], 222 bytes

```
%:
%: define cops(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) if(not false and k%:%:f%:%:d%:%:l(& (not true) <:%:i%:j%:k%:l" "%:m" "%:n%:o%:p%:q%:r%:s%:t:> ))<%%>
%:
main()<%cops(w,h,a,t,s,u,p,?,C,o,p,s,and,R,o,b,b,e,r,s)%>
```

Output:

```
Cops and Robbers
```