[CL-FOOL] CLOI 愚人赛的部分官方题解与小杂谈

小细节

谁会拿 Rank 奖励? 头图里有写哦.

image

image

发现没有,这里的问号是蓝色的,点进去可以进到彩蛋界面.

当然彩蛋界面也什么都没有,提交界面藏在下面的源码里.

那么交什么呢. CLOI 的文件里有一团垃圾,如下:

image

没后缀名,其实试试就知道是zip, 里面的.rar 其实是 txt 文档. 打开就能看到彩蛋了.

A.YRpylqjyrcNpmzjck

这个题还是很难懂的,但是题目里有个提示 a+2=c ,多试几遍就会发现题目里的文本统一右移两位貌似有点规律,因此有了下面这段代码:

#include<bits/stdc++.h>
using namespace std;

string x;
int main(){
	cin>>x;
	for(int i=0;i<=x.length()-1;++i){
		x[i]+=2;
	}
	cout<<x;
}

翻译后的题目大概长这样:

标题
[Tr{nsl{tePro|lem

题目描述
Theres[Pro|lemNeedYouToTr{nsl{te.IfYouTr{nsl{teItSuccessfully.YouWillSee[ProperPro|lem\elow0

输入格式
TheresNoNeedToPutin0[ttention.IfTheInputIs[A.YouShould[lsoPrint[AInste{dOfH{lloWorld0

输出格式
JustH{veH{lloWorldTheseTenLetters0

这下看懂了

实际上,所有的未知字符也可以统一替换掉,出现这些未知字符的原因是右移两位后 z 超过了ASCLL范围,因此考虑按循环顺序替换一下,也就是 z -> by -> a 等等(也就是把你看不懂的字符换掉),替换后彻底能看懂了:

标题
ATranslateProblem

题目描述
TheresAProblemNeedYouToTranslate.IfYouTranslateItSuccessfully.YouWillSeeAProperProblemBelow.

输入格式
TheresNoNeedToPutin.Attention,IfTheInputIsA?,YouShouldAlsoPrintA?InsteadOfHalloWorld.

输出格式
JustHaveHalloWorldTheseTenLetters.

所以这个题是让我们在输入问号的时候输出问号,否则HalloWorld .

ac代码:

#include <bits/stdc++.h>
using namespace std;

int main(){
	char a;
	cin>>a;
	if(a=='?'){
		cout<<a;
	}
	else{
		cout<<"HalloWorld";
	}
}

B.Unbreakable Order

这个题还是挺板子的. 自己推一遍会发现,在同一个强连通分量里的节点全都是同一个数字. 因此我们考虑这个题应该用 Tarjan 缩点做. 那么我们要求的答案是什么呢. 可以发现不管按什么顺序执行操作,最终都相当于从源点一个一个推下来,而每个点的权值都比父节点大 \(1\). 因此实际上我们求的是缩点之后这个有向无环图的最大深度.

题目里告诉我们可能有森林,因此我们应该从这些树里选出一个深度最小的输出.

一个这道题的 Hack 数据:

0 0

C.Color

答案在你的 cmd 里.

image

D.大吴与是见

我们来推个式子.

\(a=x(y+z)=xy+xz,b=y(x+z)=xy+yz,c=z(x+y)=xz+yz\),那么有 \(sum=xy+yz+xz=\frac{a+b+c}{2}\),所以 \(xy=sum=c,yz=sum-a,xz=sum-b\),而 \(x^{2}=\frac{xy\times xz}{yz}\),以此类推,我们就能全部推出答案.

但是这个题还有个问题. 数据范围写的是 \(\le 1\times 10^{9}\),那么 \(x(y+z)\) 最大就应该是 \(2\times 10^{18}\),我们在运算中涉及到了 \(xy\times yz\),那么最大就应该是 \(1\times 10^{36}\),会炸long long. 因此我们不能这么干. 而是要使用 int128. 因为 int128 没有开根号的运算,所以要二分手写一个.

下面是 wlesq 对这道题的解法

#include <bits/stdc++.h>
#define ll long long
#define i1 __int128
using namespace std;
i1 x,y,z;__int128 tx,ty,tz,x2;
i1 rd()
{
	i1 x=0;
	string s;
	cin>>s;
	for(unsigned int i=0;i<s.size();i++)
	{
		x=(s[i]-'0')+x*10;
	}
	return x;
}
void pr(__int128 x)
{
	stack<int>o;
    while(x)o.push(x%10),x/=10;
    while(!o.empty()){
    	cout<<o.top();o.pop();
	}
}
bool check(ll mid)
{
	if((i1)mid*mid<x2)return 0;
	return 1;
}
void fen(ll l,ll r)
{
	while(l<=r)
	{
		ll mid=(l+r)>>1;
		if(check(mid))
		{
			r=mid-1;
			tx=mid;
		}else 
		{
			l=mid+1;
		}
	}
}
int main()
{
	x=rd();y=rd();z=rd();
	__int128 xy=(x+y-z)/2,yz=y-xy,xz=z-yz;
	x2=xy*xz/yz;
	fen(1,1e9);
	ty=xy/tx;tz=xz/tx;
	pr(tx);cout<<" ";pr(ty);cout<<" ";pr(tz);
	return 0;
}

E.The Most Stupid Man

啥也不说了,这道题的 Judge 代码给大家看看

#include "testlib.h"
using namespace std; 
int a[101]={625,634,644,619,649,645,633,631,622,620,648,627,628,643,621,666,638,636,626,629,654,639,630,650,623};
int main(int argc, char* argv[]) {
    registerTestlibCmd(argc, argv);
    int res=ouf.readInt();
    if(res==624){
    	quitf(_wa, "No,he can't be the most stupid man.");
    	return 0;
	}
	for(int i=0;i<=100;++i){
		if(a[i]&&res==a[i]){
			quitf(_ok, "You find the most stupid man.");
			return 0;
		}
	}
	quitf(_wa, "You haven't find the most stupid man.");
}

F.AC自动机

交到哪里吗? 其实就在题目里,你点右上角把 Markdown 复制下来看看.

H.The End

A 中是加粗的 crrcp
B 中是标题 Order
C 中是前面有个 1. 的 black
D 中是 Input
E 中是唯一的一个 print
F 中是最下面的there
G 中是wrong
H 中是eight

I.谁是凶手

题目里 \(0\le m\le 0\),说明嫌疑人就一个啊,直接输出就行了.

J.<-- Enter

我知道你们错在哪,如下

vector<int> a;int main(){for(;;)std::cin>>a[0];}

K.An Interview of CLOI

  1. 字数要够
  2. Interview单独隔开一行
  3. CLOI单独隔开一行

没了.

L.还是在西欧及

这道题的答案都在题面上有. 你要做的只是读入然后翻译. 一共有 朱温湖,邯郸可欸可,吉继润,艾斯比,测试点 五个.

另外,需要注意的是汉字的 ASCLL 有两个数.

M.What You Find It A Submit Puzzle

难道你没发现输入格式那里什么都没有很奇怪吗. 鼠标往那里动一下,其实有字,拖一下就出来了.

还是上 Judge 代码

#include "testlib.h"
using namespace std; 

int main(int argc,char*argv[]){
    registerTestlibCmd(argc,argv);
    registerGen(argc,argv,1);
	string x=ouf.readToken();
	if(x=="Mysterus"){
		quitf(_wa,"You need to find the lost letter");
	}
	if(x=="Mysterious"){
		quitf(_wa,"Point 1: 5^27");
	}
	if(x=="io"){
		quitp(0.1,"Point 2: Problem Title's First Three Letter");
	}
	if(x=="7450580596923828125"){
		quitf(_wa,"Point 3: The Writter of the Problem");
	}
	if(x=="Wha"){
		quitp(0.2,"Point 4: Answer it,if the time is 2024/4/1");
	}
	if(x=="HDK"){
		quitf(_wa,"Whole Name.");
	}
	if(x=="HaneDaniko"){
		quitp(0.3,"Yes, You Will got it.");
	}
	if(x=="2024/4/1"){
		quitp(0.4,"Point 6: BZOJ3401's name(6 length)");
	}
	if(x=="LookUp"){
		quitp(0.5,"Point 7: I AK ___");
	}
	if(x=="IOI"){
		quitp(0.6,"Point 8: www.cnblogs.com/HaneDaCafe/p/-/Input--GetPassword");
	}
	if(x=="GetPassword"){
		quitf(_wa,"The Password is mima.");
	}
	if(x=="mima"){
		quitp(0.7,"nishuodedui.");
	}
	if(x=="keqingkeainie"){
		quitp(0.7,"you find it,but the answer is the title.");
	}
	if(x=="nishuodedui"){
		quitp(0.8,"Now Print the Create Time of Vjudge CLOI");
	}
	if(x=="20240207"){
		quitp(0.9,"Now Guess a character from a to z");
	}
	if(x=="k"){
		quitf(_ok,"Thank you For Playing, the answer is 'htk+pi'");
	}
	if(x.length()==1){
		quitf(_wa,"That can't be true.");
	}
	quitf(_wa,"Not found.");
}

P.Special Th什么来着

这个题实际上是让你输出 HaneDaniko 的洛谷 UID. 因为要凑 1666 总分所以有了这么一道六分的题.

posted @ 2024-04-02 21:47  HaneDaniko  阅读(35)  评论(0编辑  收藏  举报