这位警察和强盗现在(2018年8月3日)不接受进一步竞争的警察参赛,因为强盗可能不再竞争公开答案,而是随时发布新答案。
丹尼斯以出色的6字节Sesos答案赢得了警察挑战赛
警察的挑战
参加警察比赛:
选择一种编程语言。一种有效的编程语言是可以满足以下所有三个条件的语言:
- 发布此挑战时,该文章有英文Wikipedia文章,esolangs文章或Rosetta Code文章,或者在“ 在线试用”上!。在这些页面中的任何一个链接都有口译员,使该口译员完全合法。
- 它必须满足我们关于构成编程语言的规则
- 它必须有一个免费的口译员(如啤酒)。这里免费意味着任何人都可以使用该程序而无需付费。
编写一个完整的程序,以升序输出从1到100(包括1和100)之间的数字。您可以输出为十进制整数,字节码值(
!
例如,代表33)或一进制数字(例如,代表1111
4)1。如果使用一元数,则应对数字使用任何一致的字符,并使用不同的一致的字符作为分隔符。如果使用整数,则应在每个数字之间输出一个恒定的非数字定界符。您也可以输出带有前导和尾随字符(例如[]
),但请保持明智(例如,不要在计数的两边输出一千个字节的垃圾)。您必须在答案中指定输出格式。您不得使用REPL环境或现有的样板代码。可以使用标志,但是您必须揭示答案中使用了哪些标志。该程序必须采用一个或多个源文件的形式(以排除诸如Folders之类的古怪语言),并且必须完全适合您的答案(因此其长度不能超过65,536个字符)-这对于任何认真的意见。
如果您的代码包含可打印ASCII +换行符之外的字节,请提供一个十六进制转储以确保您的代码可实际测试。
该程序必须在典型的台式PC上在5分钟内终止。
而已。但是,与所有内容一样,有一个陷阱。由于强盗的任务是猜测您使用的语言,因此您应该尽可能地使程序模糊。您还应该确保程序只能以预期的语言运行(尽管与原始挑战中的Foo破解相比,这可能是个小问题)。输出格式必须与预期的解决方案相同,以构成有效的破解。
一旦7天有没有人发现过的任何地方你的程序是有效破解的语言,你可以展示的语言并将其标记为safe
。请注意,您的提交仍然可以被破解,直到您透露语言为止。
一旦发布,您在任何情况下都不得编辑提交的源代码(因为这可能会使强盗试图破解答案的积极尝试无效)。因此,在发布之前,请确保尽可能(或不敢)打高尔夫球。如果您发现答案发布后仍然无法使用,只需删除答案并发布固定版本即可。
以字节为单位的最短安全提交方式将获胜!
1:如果您希望以其他方式输出,请在评论中询问
堆栈片段
您可以使用此堆栈片段更轻松地浏览答案:
answersSafe=[];answersCracked=[];answersUncracked=[];answerPage=1;robberTodo=[];userNames={};robberMap={};robberStats={};robberTimes={};function template($element,data){var $clone=$element.clone().removeClass('template');var html=$clone.html();for(var key in data){html=html.replace('{'+key+'}',data[key])}$clone.html(html);$element.after($clone)}function hideEmpty(){$('tbody').each(function(){if($(this).find('tr:not(.template):has(td)').length==0){$(this).find('tr:not(.empty):has(th)').addClass('inactive');$(this).find('tr.empty').removeClass('inactive')}})}function formatError(obj,reason){template($('.warn.template'),{id:obj.cop_id,cop:obj.cop_user,reason:reason})}function showAnswers(category,selector,sorter){sorter(category);$('#'+selector).find('tr:not(.template):has(td)').remove();$.each(category,function(i,answer){template($('#'+selector+' .template'),answer)});$('code:has(br)').addClass('clickable').click(function(){$(this).toggleClass('full')});updateCountdowns()}function getAnswers(){$.ajax({url:"https://api.stackexchange.com/2.2/questions/155018/answers?pagesize=100&order=desc&sort=creation&site=codegolf&filter=!*LUzJZNOIUpZsWsZBLe&page="+(answerPage++),method:"get",dataType:"jsonp"}).then(function(data){$.each(data.items,function(i,answer){var obj={cop_id:answer.answer_id,cop_user:answer.owner.display_name,cop_time:answer.creation_date,safe_on:answer.creation_date+604800};var $e=$('<div/>').html(answer.body);var $headers=$e.find(':header');if($headers.length==0){return formatError(obj,"no header")}var header=$headers.first().html();var $code=$e.find('pre code');if($code.length==0){return formatError(obj,"no code")}obj.code=$code.first().html().replace(/\n/g,'<br/>');if(obj.code.endsWith('<br/>')){obj.code=obj.code.slice(0,-5)}var bm=/(\d+)\s+bytes/.exec(header);if(bm==null){return formatError(obj,"no bytecount")}obj.size=parseInt(bm[1]);if(obj.size==NaN){return formatError(obj,"bytecount is NaN: "+bm[1])}obj.language=header.slice(0,bm.index).trim();while(obj.language.charAt(obj.language.length-1)!=','&&obj.language.length!=0){obj.language=obj.language.slice(0,-1)}if(obj.language.length==0){return formatError(obj,"no/bad separator before bytecount")}obj.language=obj.language.slice(0,-1).trim();obj.language_text=$('<div/>').html(obj.language).text();var end=header.slice(bm.index+bm[0].length).trim();if(end.length==0){if(obj.language!=="???"){return formatError(obj,"not marked as safe nor cracked, but language is "+obj.language+" (expected ???)")}return answersUncracked.push(obj)}if(!end.startsWith(',')){return formatError(obj,"no/bad separator after bytecount")}end=end.slice(1).trim();if(end==='safe'){return answersSafe.push(obj)}var $end=$('<div/>').html(end);var end_text=$end.text();if(!end_text.startsWith('cracked')){return formatError(obj,"expected 'cracked' or 'safe', got '"+end_text+"'")}var expectedURL='https://codegolf.stackexchange.com/a/';var $links=$end.find('a');if($links.length==0){return formatError(obj,"no cracked link")}var robberURL=$links.first().attr('href');if(!robberURL.startsWith(expectedURL)){return formatError(obj,"link does not start with "+expectedURL+": "+robberURL)}obj.robber_id=parseInt(robberURL.slice(expectedURL.length));if(obj.robber_id==NaN){return formatError(obj,"robber_id is NaN")}robberTodo.push(obj.robber_id);answersCracked.push(obj)});if(data.has_more){getAnswers()}else{getRobbers()}})}function sortBySize(category){category.sort(function(a,b){return b.size-a.size})}function sortByTime(category){category.sort(function(a,b){return b.cop_time-a.cop_time})}function sortByLiveTime(category){category.sort(function(a,b){return b.cracked_after-a.cracked_after})}function sortByCop(category){category.sort(function(a,b){return b.cop_user.localeCompare(a.cop_user)})}function sortByRobber(category){category.sort(function(a,b){return b.robber_user.localeCompare(a.robber_user)})}function sortByLanguage(category){category.sort(function(a,b){return b.language_text.localeCompare(a.language_text)})}function getRobbers(){if(robberTodo.length==0){$.each(answersCracked,function(i,answer){answer.robber_user=userNames[robberMap[answer.robber_id]];answer.cracked_after=robberTimes[answer.robber_id]-answer.cop_time;answer.cracked_after_str=formatTime(answer.cracked_after)});showAnswers(answersUncracked,'uncracked',sortByTime);showAnswers(answersCracked,'cracked',sortByLiveTime);showAnswers(answersSafe,'safe',sortBySize);hideEmpty();var graphData=[];$.each(robberStats,function(k,v){graphData.push({name:decodeEntities(userNames[k]),value:v})});graphData.sort(function(a,b){if(a.value==b.value){return a.name.localeCompare(b.name)}else{return b.value-a.value}});var graphLabels=[];var graphValues=[];$.each(graphData,function(i,obj){graphLabels.push(obj.name);graphValues.push(obj.value)});var graphColors=[];for(var i=0;i<graphData.length;i+=1){graphColors.push(['#b58900','#cb4b16','#dc322f','#d33682','#6c71c4','#268bd2','#2aa198','#859900'][i%8])}$('#robber-stats').attr('width',600);$('#robber-stats').attr('height',24*graphData.length+66);$('#answer-stats').attr('width',600);$('#answer-stats').attr('height',400);Chart.defaults.global.defaultFontColor='#839496';new Chart($('#robber-stats'),{type:'horizontalBar',data:{labels:graphLabels,datasets:[{data:graphValues,backgroundColor:graphColors}]},options:{responsive:false,legend:false,tooltips:false,layout:{padding:{right:40}},title:{display:true,text:'Number of answers cracked per robber',fontSize:18},scales:{yAxes:[{gridLines:{display:false}}],xAxes:[{gridLines:{display:false},ticks:{beginAtZero:true}}]},plugins:{datalabels:{anchor:'end',align:'end'}}}});new Chart($('#answer-stats'),{type:'pie',data:{labels:['Uncracked','Cracked','Safe'],datasets:[{data:[answersUncracked.length,answersCracked.length,answersSafe.length],backgroundColor:['#2aa198','#dc322f','#859900'],borderColor:'#002b36'}]},options:{responsive:false,tooltips:{backgroundColor:'#073642',displayColors:false},title:{display:true,text:'Number of answers in each category',fontSize:18},plugins:{datalabels:false}}});updateCountdowns();setInterval(updateCountdowns,1000);$('#loading').hide()}else{$.ajax({url:"https://api.stackexchange.com/2.2/answers/"+robberTodo.slice(0,100).join(';')+"?site=codegolf&filter=!*RB.h_b*K*dQTllFUdy",method:"get",dataType:"jsonp"}).then(function(data){$.each(data.items,function(i,robber){robberTodo=robberTodo.filter(function(e){return e!==robber.answer_id});robberMap[robber.answer_id]=robber.owner.user_id;robberTimes[robber.answer_id]=robber.creation_date;userNames[robber.owner.user_id]=robber.owner.display_name;if(robber.owner.user_id in robberStats){robberStats[robber.owner.user_id]+=1}else{robberStats[robber.owner.user_id]=1}});getRobbers()})}}var decodeEntities=(function(){var element=document.createElement('div');function decodeHTMLEntities(str){if(str&&typeof str==='string'){str=str.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,'');str=str.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,'');element.innerHTML=str;str=element.textContent;element.textContent=''}return str}return decodeHTMLEntities})();function formatTime(seconds){var arr=[];if(seconds>86400){arr.push(Math.floor(seconds/86400)+" days");seconds%=86400}if(seconds>3600){arr.push(Math.floor(seconds/3600)+" hours");seconds%=3600}if(seconds>60){arr.push(Math.floor(seconds/60)+" minutes");seconds%=60}if(seconds!=0){arr.push(seconds+" seconds")}return arr.join(', ').split('').reverse().join('').replace(',','dna ').split('').reverse().join('')}function updateCountdowns(){$('tr:not(.template) .countdown').each(function(){var target=$(this).attr('data-target');var now=Math.floor(+new Date()/1000);if(target-now<86400){$(this).addClass('urgent')}else{$(this).removeClass('urgent')}if(target<now){$(this).removeClass('countdown').text('Safe! (according to your computer\'s time)')}else{$(this).text(formatTime(target-now))}})}$('thead, #stats-header').click(function(){$(this).toggleClass('hidden')});getAnswers();
*{margin:0;padding:0;font:12pt sans-serif;}html,body{background:#002b36;color:#839496;width:100%;height:100%;}body>:not(.i):not(#loading){margin:5px;}#loading{background:rgb(64,64,64,0.8);position:fixed;top:0;left:0;width:100%;height:100%;display:table;z-index:100;}#loading-wrapper{display:table-cell;vertical-align:middle;text-align:center;font-size:20pt;color:#ddd;}#fullpage-msg,.warn{padding:5px 5px 5px 5px;margin:10px 0px;}@media (min-width:800px){#fullpage-msg{display:none;}}a{color:#268bd2;}code{font-family:monospace;font-size:16px;background:#073642;padding:1px 5px;white-space:pre;position:relative;}.clickable{cursor:pointer;}code:not(.full){max-height:38px;overflow:hidden;}code.clickable:not(.full):before{content:'';background:linear-gradient(transparent 20px,rgba(7,54,66,0.8) 32px,#002b36);position:absolute;top:0;left:0;width:100%;height:100%;}td,th{padding:5px;vertical-align:top;white-space:nowrap;text-align:left;}thead th,#stats-header{font-size:20pt;margin:10px 0;user-select:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;cursor:pointer;}th{font-weight:bold;}path{fill:#839496;}thead:not(.hidden) .right-arrow,#stats-header:not(.hidden) .right-arrow,thead.hidden .down-arrow,#stats-header.hidden .down-arrow{visibility:hidden;}.hidden+tbody,.hidden+#stats,.template,.inactive{display:none;}small,code{display:block;}small,small a{font-size:8pt;}#stats-header{font-weight:bold;padding:6px;}.urgent{color:#dc322f;}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script><script>!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("chart.js")):"function"==typeof define&&define.amd?define(["chart.js"],e):e(t.Chart)}(this,function(t){"use strict";var e=(t=t&&t.hasOwnProperty("default")?t.default:t).helpers,n={toTextLines:function(t){var n,a=[];for(t=[].concat(t);t.length;)"string"==typeof(n=t.pop())?a.unshift.apply(a,n.split("\n")):Array.isArray(n)?t.push.apply(t,n):e.isNullOrUndef(t)||a.unshift(""+n);return a},toFontString:function(t){return!t||e.isNullOrUndef(t.size)||e.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family},textSize:function(t,e,n){var a,r=[].concat(e),i=r.length,o=t.font,l=0;for(t.font=n.string,a=0;a<i;++a)l=Math.max(t.measureText(r[a]).width,l);return t.font=o,{height:i*n.lineHeight,width:l}},parseFont:function(a){var r=t.defaults.global,i=e.valueOrDefault(a.size,r.defaultFontSize),o={family:e.valueOrDefault(a.family,r.defaultFontFamily),lineHeight:e.options.toLineHeight(a.lineHeight,i),size:i,style:e.valueOrDefault(a.style,r.defaultFontStyle),weight:e.valueOrDefault(a.weight,null),string:""};return o.string=n.toFontString(o),o},bound:function(t,e,n){return Math.max(t,Math.min(e,n))}};function a(t,e){var n=e.x,a=e.y;if(null===n)return{x:0,y:-1};if(null===a)return{x:1,y:0};var r=t.x-n,i=t.y-a,o=Math.sqrt(r*r+i*i);return{x:o?r/o:0,y:o?i/o:-1}}function r(t,e,n,a,r){switch(r){case"center":n=a=0;break;case"bottom":n=0,a=1;break;case"right":n=1,a=0;break;case"left":n=-1,a=0;break;case"top":n=0,a=-1;break;case"start":n=-n,a=-a;break;case"end":break;default:r*=Math.PI/180,n=Math.cos(r),a=Math.sin(r)}return{x:t,y:e,vx:n,vy:a}}var i={arc:function(t,e,n){var a,i=(t.startAngle+t.endAngle)/2,o=Math.cos(i),l=Math.sin(i),s=t.innerRadius,d=t.outerRadius;return a="start"===e?s:"end"===e?d:(s+d)/2,r(t.x+o*a,t.y+l*a,o,l,n)},point:function(t,e,n,i){var o=a(t,i),l=t.radius,s=0;return"start"===e?s=-l:"end"===e&&(s=l),r(t.x+o.x*s,t.y+o.y*s,o.x,o.y,n)},rect:function(t,e,n,i){var o=t.horizontal,l=Math.abs(t.base-(o?t.x:t.y)),s=o?Math.min(t.x,t.base):t.x,d=o?t.y:Math.min(t.y,t.base),u=a(t,i);return"center"===e?o?s+=l/2:d+=l/2:"start"!==e||o?"end"===e&&o&&(s+=l):d+=l,r(s,d,u.x,u.y,n)},fallback:function(t,e,n,i){var o=a(t,i);return r(t.x,t.y,o.x,o.y,n)}},o=t.helpers;var l=function(t,e){this._el=t,this._index=e,this._model=null};o.extend(l.prototype,{_modelize:function(e,a,r,l){var s,d=this._index,u=o.options.resolve,f=n.parseFont(u([r.font,{}],l,d));return{align:u([r.align,"center"],l,d),anchor:u([r.anchor,"center"],l,d),backgroundColor:u([r.backgroundColor,null],l,d),borderColor:u([r.borderColor,null],l,d),borderRadius:u([r.borderRadius,0],l,d),borderWidth:u([r.borderWidth,0],l,d),color:u([r.color,t.defaults.global.defaultFontColor],l,d),font:f,lines:a,offset:u([r.offset,0],l,d),opacity:u([r.opacity,1],l,d),origin:function(t){var e=t._model.horizontal,n=t._scale||e&&t._xScale||t._yScale;if(!n)return null;if(void 0!==n.xCenter&&void 0!==n.yCenter)return{x:n.xCenter,y:n.yCenter};var a=n.getBasePixel();return e?{x:a,y:null}:{x:null,y:a}}(this._el),padding:o.options.toPadding(u([r.padding,0],l,d)),positioner:(s=this._el,s instanceof t.elements.Arc?i.arc:s instanceof t.elements.Point?i.point:s instanceof t.elements.Rectangle?i.rect:i.fallback),rotation:u([r.rotation,0],l,d)*(Math.PI/180),size:n.textSize(e,a,f),textAlign:u([r.textAlign,"start"],l,d)}},update:function(t,e,a){var r,i,l,s=null,d=this._index;o.options.resolve([e.display,!0],a,d)&&(r=a.dataset.data[d],i=o.valueOrDefault(o.callback(e.formatter,[r,a]),r),s=(l=o.isNullOrUndef(i)?[]:n.toTextLines(i)).length?this._modelize(t,l,e,a):null),this._model=s},draw:function(t){var e,a,r,i,l,s,d,u,f,h,c,y,g,x,b=this._model;b&&b.opacity&&(r=b.size,i=b.padding,l=r.height,s=r.width,u=-l/2,e={frame:{x:(d=-s/2)-i.left,y:u-i.top,w:s+i.width,h:l+i.height},text:{x:d,y:u,w:s,h:l}},a=function(t,e,n){var a=e.positioner(t._view,e.anchor,e.align,e.origin),r=a.vx,i=a.vy;if(!r&&!i)return{x:a.x,y:a.y};var o=e.borderWidth||0,l=n.w+2*o,s=n.h+2*o,d=e.rotation,u=Math.abs(l/2*Math.cos(d))+Math.abs(s/2*Math.sin(d)),f=Math.abs(l/2*Math.sin(d))+Math.abs(s/2*Math.cos(d)),h=1/Math.max(Math.abs(r),Math.abs(i));return u*=r*h,f*=i*h,u+=e.offset*r,f+=e.offset*i,{x:a.x+u,y:a.y+f}}(this._el,b,e.frame),t.save(),t.globalAlpha=n.bound(0,b.opacity,1),t.translate(Math.round(a.x),Math.round(a.y)),t.rotate(b.rotation),f=t,h=e.frame,y=(c=b).backgroundColor,g=c.borderColor,x=c.borderWidth,(y||g&&x)&&(f.beginPath(),o.canvas.roundedRect(f,Math.round(h.x)-x/2,Math.round(h.y)-x/2,Math.round(h.w)+x,Math.round(h.h)+x,c.borderRadius),f.closePath(),y&&(f.fillStyle=y,f.fill()),g&&x&&(f.strokeStyle=g,f.lineWidth=x,f.lineJoin="miter",f.stroke())),function(t,e,n,a){var r,i,o,l=a.textAlign,s=a.font.lineHeight,d=a.color,u=e.length;if(u&&d)for(r=n.x,i=n.y+s/2,"center"===l?r+=n.w/2:"end"!==l&&"right"!==l||(r+=n.w),t.font=a.font.string,t.fillStyle=d,t.textAlign=l,t.textBaseline="middle",o=0;o<u;++o)t.fillText(e[o],Math.round(r),Math.round(i),Math.round(n.w)),i+=s}(t,b.lines,e.text,b),t.restore())}});var s=t.helpers,d={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",formatter:function(t){if(s.isNullOrUndef(t))return null;var e,n,a,r=t;if(s.isObject(t))if(s.isNullOrUndef(t.label))if(s.isNullOrUndef(t.r))for(r="",a=0,n=(e=Object.keys(t)).length;a<n;++a)r+=(0!==a?", ":"")+e[a]+": "+t[e[a]];else r=t.r;else r=t.label;return""+r}},u=t.helpers,f="$datalabels";t.defaults.global.plugins.datalabels=d,t.plugins.register({id:"datalabels",afterDatasetUpdate:function(t,e,n){var a,r,i,o,s,d=t.data.datasets[e.index],h=(a=n,!1===(r=d.datalabels)?null:(!0===r&&(r={}),u.merge({},[a,r]))),c=e.meta.data||[],y=c.length,g=t.ctx;for(g.save(),i=0;i<y;++i)(o=c[i])&&!o.hidden?(s=new l(o,i)).update(g,h,{chart:t,dataIndex:i,dataset:d,datasetIndex:e.index}):s=null,o[f]=s;g.restore()},afterDatasetDraw:function(t,e){var n,a,r=e.meta.data||[],i=r.length;for(n=0;n<i;++n)(a=r[n][f])&&a.draw(t.ctx)}})});</script><div id="loading"><span id="loading-wrapper">Loading...</span></div><div id="fullpage-msg"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 111.577 111.577"><path d="M78.962,99.536l-1.559,6.373c-4.677,1.846-8.413,3.251-11.195,4.217c-2.785,0.969-6.021,1.451-9.708,1.451c-5.662,0-10.066-1.387-13.207-4.142c-3.141-2.766-4.712-6.271-4.712-10.523c0-1.646,0.114-3.339,0.351-5.064c0.239-1.727,0.619-3.672,1.139-5.846l5.845-20.688c0.52-1.981,0.962-3.858,1.316-5.633c0.359-1.764,0.532-3.387,0.532-4.848c0-2.642-0.547-4.49-1.636-5.529c-1.089-1.036-3.167-1.562-6.252-1.562c-1.511,0-3.064,0.242-4.647,0.71c-1.59,0.47-2.949,0.924-4.09,1.346l1.563-6.378c3.829-1.559,7.489-2.894,10.99-4.002c3.501-1.111,6.809-1.667,9.938-1.667c5.623,0,9.962,1.359,13.009,4.077c3.047,2.72,4.57,6.246,4.57,10.591c0,0.899-0.1,2.483-0.315,4.747c-0.21,2.269-0.601,4.348-1.171,6.239l-5.82,20.605c-0.477,1.655-0.906,3.547-1.279,5.676c-0.385,2.115-0.569,3.731-0.569,4.815c0,2.736,0.61,4.604,1.833,5.597c1.232,0.993,3.354,1.487,6.368,1.487c1.415,0,3.025-0.251,4.814-0.744C76.854,100.348,78.155,99.915,78.962,99.536z M80.438,13.03c0,3.59-1.353,6.656-4.072,9.177c-2.712,2.53-5.98,3.796-9.803,3.796c-3.835,0-7.111-1.266-9.854-3.796c-2.738-2.522-4.11-5.587-4.11-9.177c0-3.583,1.372-6.654,4.11-9.207C59.447,1.274,62.729,0,66.563,0c3.822,0,7.091,1.277,9.803,3.823C79.087,6.376,80.438,9.448,80.438,13.03z"/></svg> Click the "Full page" link in the top right for vastly superior experience</div><div class="warn template">⚠ <a href="https://codegolf.stackexchange.com/a/{id}">This answer</a> by {cop} is not formatted correctly ({reason}).</div><table><thead><tr><th colspan="5"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 9 9"><path class="right-arrow" d="M 0 0 L 0 9 L 9 4.5 Z"/><path class="down-arrow" d="M 0 0 L 9 0 L 4.5 9 Z"/></svg> Uncracked answers</th></tr></thead><tbody id="uncracked"><tr><th colspan="3" onclick="showAnswers(answersUncracked, 'uncracked', sortByCop)" class="clickable">Posted by</th><th onclick="showAnswers(answersUncracked, 'uncracked', sortBySize)" class="clickable">Size</th><th onclick="showAnswers(answersUncracked, 'uncracked', sortByTime)" class="clickable">Safe in</th><th>Code</th></tr><tr class="empty inactive"><th colspan="5">There are no uncracked answers</th></tr><tr class="template"><td colspan="3"><a href="https://codegolf.stackexchange.com/a/{cop_id}">{cop_user}</a></td><td>{size} bytes</td><td><span class="countdown" data-target="{safe_on}"></span></td><td><code>{code}</code></td></tr></tbody><thead><tr><th colspan="5"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 9 9"><path class="right-arrow" d="M 0 0 L 0 9 L 9 4.5 Z"/><path class="down-arrow" d="M 0 0 L 9 0 L 4.5 9 Z"/></svg> Cracked answers</th></tr></thead><tbody id="cracked"><tr><th onclick="showAnswers(answersCracked, 'cracked', sortByCop)" class="clickable">Posted by</th><th onclick="showAnswers(answersCracked, 'cracked', sortByRobber)" class="clickable">Cracked by</th><th onclick="showAnswers(answersCracked, 'cracked', sortByLanguage)" class="clickable">Language</th><th onclick="showAnswers(answersCracked, 'cracked', sortBySize)" class="clickable">Size</th><th onclick="showAnswers(answersCracked, 'cracked', sortByLiveTime)" class="clickable">Cracked after</th><th>Code</th></tr><tr class="empty inactive"><th colspan="5">There are no cracked answers</th></tr><tr class="template"><td><a href="https://codegolf.stackexchange.com/a/{cop_id}">{cop_user}</a></td><td><a href="https://codegolf.stackexchange.com/a/{robber_id}">{robber_user}</a></td><td>{language}</td><td>{size} bytes</td><td>{cracked_after_str}</td><td><code>{code}</code></td></tr></tbody><thead><tr><th colspan="5"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 9 9"><path class="right-arrow" d="M 0 0 L 0 9 L 9 4.5 Z"/><path class="down-arrow" d="M 0 0 L 9 0 L 4.5 9 Z"/></svg> Safe answers</th></tr></thead><tbody id="safe"><tr><th colspan="2" onclick="showAnswers(answersSafe, 'safe', sortByCop)" class="clickable">Posted by</th><th onclick="showAnswers(answersSafe, 'safe', sortByLanguage)" class="clickable">Language</th><th colspan="2" onclick="showAnswers(answersSafe, 'safe', sortBySize)" class="clickable">Size</th><th>Code</th></tr><tr class="empty inactive"><th colspan="5">There are no safe answers</th></tr><tr class="template"><td colspan="2"><a href="https://codegolf.stackexchange.com/a/{cop_id}">{cop_user}</a></td><td>{language}</td><td colspan="2">{size} bytes</td><td><code>{code}</code></td></tr></tbody></table><div id="stats-header"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 9 9"><path class="right-arrow" d="M 0 0 L 0 9 L 9 4.5 Z"/><path class="down-arrow" d="M 0 0 L 9 0 L 4.5 9 Z"/></svg> Statistics</div><div id="stats"><div><canvas id="robber-stats"/></div><div><canvas id="answer-stats"/></div></div><small>Snippet made by <a href="https://codegolf.stackexchange.com/u/55934/" target="_blank">NieDzejkob</a>, licensed as <a href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank">CC 3.0 BY-SA</a>. "Info" icon made by <a href="https://www.flaticon.com/authors/chanut" target="_blank">Chanut</a> from <a href="https://www.flaticon.com/" target="_blank">Flaticon</a>, licensed as <a href="http://creativecommons.org/licenses/by/3.0/" target="_blank">CC 3.0 BY</a>. "Arrow" icons made by <a href="https://codegolf.stackexchange.com/u/12012/" target="_blank">Dennis</a> for <a href="https://tio.run/" target="_blank">Try It Online</a>, licensed as <a href="https://github.com/TryItOnline/tryitonline/blob/master/LICENSE" target="_blank">MIT</a>. Some code shamelessly copy-pasted from <a href="https://stackoverflow.com/a/9609450">this answer</a> on Stack Overflow by <a href="https://stackoverflow.com/u/24950">Robert K</a>, licensed as <a href="https://creativecommons.org/licenses/by-sa/3.0/">CC 3.0 BY-SA</a>. This snippet utilises <a href="http://jquery.com/">jQuery</a> (<a href="https://github.com/jquery/jquery/blob/master/LICENSE.txt">MIT</a>), <a href="http://www.chartjs.org/">chart.js</a> (<a href="https://github.com/chartjs/Chart.js/blob/master/LICENSE.md">MIT</a>) and <a href="https://github.com/chartjs/chartjs-plugin-datalabels/">chartjs-plugin-datalabels</a> (<a href="https://github.com/chartjs/chartjs-plugin-datalabels/blob/master/LICENSE.md">MIT</a>). Color scheme: <a href="http://ethanschoonover.com/solarized">Solarized by Ethan Schoonover</a> (<a href="https://github.com/altercation/solarized/blob/master/LICENSE">MIT</a>).</small>
格式化
(如果您不打算作为警察参加,请随时跳过本节)
这是新警察的答案所必需的,以使上面的代码片段可以解析它们。
新答案应包含这样的标题:
# ???, [N] bytes
[N]
代码的大小在哪里,以字节为单位,???
应按字面显示。如果答案在7天内没有被破解,并且您想通过显示语言来确保答案安全,则只需替换
???
并添加safe
到末尾即可,例如# Ruby, [N] bytes, safe
可以随意将语言名称链接到相关网站,例如esolangs页面或GitHub存储库。该链接将显示在页首横幅中。
如果其他用户成功破解了您的提交,请同时添加语言以及类似的通知
# Ruby, [N] bytes, [cracked](crack-link) by [user]
这里
[user]
是提交第一个有效破解的用户的名称,并且crack-link
是指向强盗线程中相应答案的链接。请使用从“共享”按钮获得的短链接格式。随意使用户名成为其个人资料页面的链接。如果破解中使用的语言与您预期的语言不同,则您的答案仍然是破解的,您应遵循此格式。但是,您可以在答案中提及您希望将其用作其他内容。您可以选择是否要显示预期的答案,还是要让Robbers玩得更开心。
祝警察好运!