跳到正文

个人记录

Anomynous 的愚人节比赛 2023 题解

MatrixGroup约 21 分钟
原文
文章信息与版本

文章信息

发布
2022年12月3日
收录
2025年12月12日
更新
2026年9月30日
篇幅
约 21 分钟

版本

  1. v1当前

注:I 题题解在最后。

A. Anything is Useful

根据标题,anything\texttt{anything} 是有用的。(输入格式是小写字母字符串啊!!!)

趣事:被判断长度为 88 水过了。

C++
#include <bits/stdc++.h>
using namespace std;
string s;
int main()
{
    cin>>s;
    if(s=="anything") cout<<"Useful";
    else cout<<"Useless";
}

B. Blank Filling

找到剪贴板,把颜色转化为 rgb,得到:

C++
92 94 74
115 51 76
120 18 77
138 29 81
180 9 100
184 41 103

找规律时间到!

92,115,120,138,180,184,(207)92,115,120,138,180,184,(207):82808280 的因数。

94,51,18,29,0‾9,41,(35)94,51,18,29,\underline09,41,(35):sin⁡4≈−0.756802495307928251372639094511829094135‾912887336472571485416773\sin4\approx-0.7568024953079282513726390\underline{94511829094135}912887336472571485416773

74C,76B,77C,81D,100H,103D,(106)E74\text{C},76\text{B},77\text{C},81\text{D},100\text{H},103\text{D},(106)\text{E}:cf *2100 题目的比赛编号。

转化为颜色是 #cf236a,于是交 CF236A 的 AC 代码即可。

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

string s;set<char> t; 
int main()
{
	cin>>s;for(char c:s)t.insert(c);cout<<((t.size()&1)?"IGNORE HIM!":"CHAT WITH HER!")<<endl;
}

D. Dynamic Blue

搜集一下关键信息:

  • OEIS rules
  • 一行一个正整数 v(1≤v≤7)v(1\le v\le7)
  • 一行一个正整数表示答案
  • 标题叫做 Dynamic Blue
  • 标签:贪心

为什么一道愚人节题目要有标签?

为什么数据范围写在了输入格式一边?

为什么标题叫做 Dynamic Blue?

考虑找到一道对应题目。

v(1≤v≤7)v(1\le v\le7) 是 Codeforces 的常用数据范围标识方法。

考虑找 Codeforces、蓝题、标签有且仅有动态树规划、贪心的题。

是 CF484D. Kindergarten。(注:CF1748A 是新题)

然后就发现没什么信息可以用了?别忘了 OEIS。

发挥一下想象力,搜索 kindergarten,发现了唯一一个数列。

1≤v≤71\le v\le7,就是它了!

Python
a=[0,1,3,4,6,8,10,12]
print(a[int(input())])

趣事:怎么这么多套数据的。

E. Excited Day

考虑小数化分数。

13.12˙33766˙=2021154,15.310˙6˙=202113213.1\dot23376\dot6=\dfrac{2021}{154},15.31\dot0\dot6=\dfrac{2021}{132}。

考虑 Day 的含义。发现日期可以写成 YYYY/MM/DD 的格式,考虑它们是 Y÷M÷DY\div M\div D 的结果。

于是各得到可能的日期是 2021/7/22 或 2021/11/14 ,和 2021/6/22,2021/11/12 或 2021/12/11。

和 D 题一样,又是 v(1≤v≤7)v(1\le v\le7),考虑 Codeforces。

除以 100100 是整数,考虑 *difficulty。

找对应日期 77 题的比赛(1584 和 1608),将对应的 *difficulty 相加(两个小数是相加的)即可。

C++
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int t;
	cin>>t;
	if(t==1) cout<<16;
	if(t==2) cout<<22;
	if(t==3) cout<<26;
	if(t==4) cout<<44;
	if(t==5) cout<<51;
	if(t==6) cout<<58;
	if(t==7) cout<<67;
	return 0;
} 
//3500 3200 2800 2400 1700 1200 800
//3200 2600 2300 2000 900 1000 800

F. Friend

  • 怎么可能真的让你去打表啊。
  • 肯定有人不知道我的 Codeforces 账号啊。
  • 别人的代码怎么都这么短啊!

考虑 Breakingtdasc 指的是 Codeforces 用户名,输出 00 即可。

Python
print(0+0+0)

G. Guzhi is Useless

发现 30322d022e212f18\tt 30322d022e212f18 是个十六进制字符串,大数字出现在偶数位,考虑两位一分割化为十进制,得到 [48,50,45,2,46,33,47,24][48, 50, 45, 2, 46, 33, 47, 24]。

发现都 ≤50\le 50,考虑是咕值排名,排名对应什么呢?标题暗示咕值是没用的,因此考虑用户名。

代码
wlzhouzhuan
xby070301
Bigjoker
yzy1
ve**orwyx
tzc_2012_awa
Eps**on_Cube
gxy001

发现有的看不清了,没有关系,猜想只和第一个字母有关(为什么不是最后一个?可以猜猜,实在不行试一下。),得到 wxByvtEg。88 位,猜测是剪贴板代码,记得化为小写,得到这个。

诶怎么不对啊,诶怎么只有一个测试点啊,哦原来是输出样例。

Python
print('81f212e220d22303')

J. Jramo Asektmi

发现字母被打乱啦!题面应该是:

代码
We have checked the statement many times, so you can read it without
Ew ahev cedhcek eth netaetmts ynma eistm, os you cna drae it itwtohu

difficulty
ftydcfiuli.

You are given an array a consisting of n integers.
You aer vnegi na aaryr a igsitonnsc of n tiegrnes.

Sort the array in non-decreasing order and print it.
Rsot eth ryara in nno-esrdeicnag deorr adn tnpir it.

The input contains two lines.
Teh punti snoainct owt selin.

The first line contains one integer n.
Hte trsif neli ncansoti oen regenti n.

The second line contains n integers separated by spaces which are
Eht ecsnod elin ncisaotn n irengste rtaedeasp yb epcssa iwhch ear 

a_1,a_2,...,a_n.
a_1,a_2,...,a_n.

The output contains one line, which contains the numbers in the
Eth uutopt stanncoi oen neil, chihw antcoins het bnreums in the

sorted array separated by spaces.
srdeto rraay reapetsda yb secspa.

于是交了一个排序。为啥过不了?

观察样例和标题。发现数(包括 nn)也会被打乱。比如 13→3113\to31。

于是就做完了。

C++
#include <bits/stdc++.h>
#define int long long
using namespace std;
int a[100005],tp;
signed main(){
	string s;
	cin>>s;
	string x;
	while(cin>>x){
		tp++;
		if(x=="01"){
			x="10";
		}
		else if(x=="02"){
			x="20";
		}
		if(x.size()==1){
			a[tp]=x[0]-'0';
			continue;
		}
		int t=x[0]-'0',t2=x[1]-'0';
		if(t*10+t2>20){
			swap(t,t2);
		}
		a[tp]=t*10+t2;
	}
	sort(a+1,a+tp+1);
	for(int i=1;i<=tp;i++){
		cout<<a[i]<<" ";
	}
}

N. now Fifth December

为何 now 不大写?说明要强调 Fifth 和 Decemeber。

12 月 5 号?好像没什么特别的。但是 Fifth Decemeber 会让你想到什么?Fibonacci Decimal。

观察样例,11 51411\ 514?317811,5142293178\textbf{11,514}229。将 Fibonacci 数连在一起(11235),输出第 l∼rl\sim r 个字符即可。

C++
#include <bits/stdc++.h>
#define per1(i,n) for(int i=(n);i>=1;--i)
typedef long long ll;
using namespace std;
struct high{
	int a[1445];
	int len;
	void init()
	{
		a[len=1]=1;
	}
	void getsum(const high&x,const high&y)
	{
		int cur=0;
		len=max(x.len,y.len);
		for(int i=1;i<=len;++i)
		{
			a[i]=cur+x.a[i]+y.a[i];
			cur=a[i]/10;a[i]%=10;
		}
		if(cur)
		{
			a[++len]=1;
		}
	}
	void get(const high&x)
	{
		len=x.len;
		for(int i=1;i<=len;++i)
		{
			a[i]=x.a[i];
		}
	}
};
high a,b,c;
string s="011";
void makeit()
{
	c.getsum(a,b);
	per1(i,c.len) s+=char('0'+c.a[i]);
	a.get(b);b.get(c);
}
int l,r;
int main()
{
	a.init();b.init();
	while(s.size()<=123477) makeit();
	ios_base::sync_with_stdio(false);
	cin>>l>>r;
	for(int i=l;i<=r;++i) cout<<s[i];
}

O. One Important Test

先算出来 7.1\bf 7.1 的答案,为 21002100。

100100 的倍数?一定是凑好的,猜测是 *difficulty。

猜测小问是指 subtask,于是搜索 (id)G1 的 *difficulty 为 21002100。

发现是 1185。输出本场题目的 *difficulty 即可。

Python
print(800,1200,1200,1700,1700,2000,2100,2100,2600)

P. Paranoia

懂得都懂。(实际上你点开下面的链接也可以/xyx)

得到 1,9,3,1,9,81,9,3,1,9,8 之后猜测是什么的编号。枚举发现是题单即可。

Python
print('DEliVER me paRAnoiA')

R. Reversed Wordle

考虑猜本质不同字母个数不多的单词(即为 33 个的)。

前三次靠人类智慧,后三次靠减少解空间即可。

(贪心也不是不可以)

php
MUMMY
CIVIC
BOFFO
PAPAW
TWEET
SLYLY

T. Time Limit Exceeded

格子 1:考察颜色,为 #3FCEF2。

格子 2:考虑剪贴板,在这里。同时暗示格子 5 是没用的。

格子 3:考察角落的小字,为 1f37d3。

格子 4:答案是 Div2 和 6e9。Div2 不是十六进制? IV=4\texttt{IV}=4。

格子 6:传统艺能,使用油漆桶覆盖之。

格子 7:U 暗示 Unicode 码,鱼的 unicode 编码为 4006040060,前缀 0x 意味着转化为十六进制 0x9c7c(U+9c7c),X=10=a\texttt{X}=10=\tt a。

格子 8:十年,decade。

格子 9:考察标题,time limit 817ms,加上 memory limit 293,即可。

C++
#include <bits/stdc++.h>
using namespace std;
int main()
{
	printf("3fcef2\n");
	printf("1b8ce5\n");
	printf("1f37d3\n");
	printf("d426e9\n");
	printf("72d032\n");
	printf("0a9c7c\n");
	printf("decade\n");
	printf("817293");
	return 0;
}

U. Unusual Musical Potential

以下这部分猜测能力强的同学可以跳过

Musical = 音游,Potential 是 Arcaea 中的潜力值,加上有约束这一项,考虑和 ARC 有关。

以上这部分猜测能力强的同学可以跳过

考虑 M??? 10\texttt{M??? 10} 是题目名,可以找到 ARC126。

答案在 44004400 内,恰好 66 个数,猜测是 difficulty,在 kenkoooo 上找到即可。

Python
print([0,465,1370,1824,2332,2766,3488][int(input())])

V. Virtual Language

找出不同点和相同点:

代码
lad FRes zr detep eee
	letter Les [FRum] READa()
lad FRes fv detep egt
	lADDer Les [FRum] Lum [lANDer FRum sx]
lad FRes nn peted to
	lORer Les [lLESSer FRes sx] Lum [FRum]
(W)RIT(E)a(Lum [zr] , Lum [oe])

于是就是

C++
for(int fr=<zr>;fr ?? <eee>;?? fr)
	l[fr] <let> read
for(int fr=<fv>;fr ?? <egt>;?? fr)
	l[fr] += l[fr & <sx>]
for(int fr=<nn>;fr ?? <to>;?? fr)
	l[fr<=<sx>] |= l[fr]
cout<<l[<zr>]<<' '<<l[<oe>]<<endl;

唯一的问题是数字是多少。因为输入 1212 个猜测 zr=0,eee=11zr=0,eee=11。

发现 sx=six,egt=eight,fv=five,etc.

于是就做好了。

C++
#include <bits/stdc++.h>
using namespace std;
int l[12];
int main()
{
	for(int fr=0;fr<=11;++fr)
		cin>>l[fr];
	for(int fr=5;fr<=8;++fr)
		l[fr]+=l[fr&6];
	for(int fr=9;fr>=2;--fr)
		l[fr<=6]|=l[fr];
	cout<<l[0]<<' '<<l[1];
}

I. Is It rated? - 4

提示:做出一些别的题是做此题的前提。

根据题目意思,我们要找出 1515 场洛谷公开赛。

根据输出暗示,我们主要由日期入手。

  • A

复制 Markdown。

发现有一段

代码
小 C 有一个物品。$%2021Apr.8$

于是就是 20212021 年 44 月 88 日的 CoOI Round 1,unrated。

  • B

找到那个剪贴板,日期为 20222022 年 1212 月 44 日。

所以是 20222022 年 1212 月 44 日的「DMOI」Round 1,unrated。

  • D

输入格式有一段

莎士比亚曾经在二零二一年十二月十八日提到过,人的一生是短的,但如果卑劣地过这一生,就太长了。

于是就是 20212021 年 1212 月 1818 日的 JRKSJ 的比赛 Round 3,unrated。

  • E

发现原题解题过程中的两个日期 2021/11/142021/11/14 和 2021/12/112021/12/11,11/1411/14 没有洛谷公开赛,12/1112/11 有。

因此是 20212021 年 1212 月 1111 日的 NtF Round 2,unrated。

  • F

根据样例输入,显然是 20192019 年 66 月 2929 日的 X Round 2,rated。

  • G

对答案图片油漆桶,发现有个 Sunday。

哪个 Sunday?合理猜测比较靠近题面中图片截下的时间。

发现大部分更新在 20222022 年 44 月 44 日,猜测是 44 月 44 日之后截下的。

因此是 20222022 年 44 月 1010 日的【LGR-106】洛谷 4 月月赛 & MCOI R8,rated。

  • I

显然在样例当中。

等等,20212021 年 88 月 1414 日的 [DCOI2021] CSP 模拟赛不是unrated吗?为什么是 Yes?

考察标题,是 Is It Rated 减四,因此所有日期输出都需要倒退四天。

因此是 20212021 年 88 月 1818 日的 「Wdoi2021」Windy OI Round3,rated。

  • J

样例输出应该是 2 8 10,结合输入是 2018/10/282018/10/28。

但是这一天怎么有 44 场公开赛?J 题提示有:

注:样例不保证是正确的,直接的,中肯的,雅致的,客观的,完整的,立体的,全面的,辩证的,雅俗共赏的,一针见血的,直击要害的。

所以既然它们都是 unrated,你也不需要管是哪一场啦。

  • N

显然在样例当中。因此是 20162016 年 77 月 3131 日的【LGR-023】洛谷7月月赛暨“HansBug的救赎第2弹”,unrated。

  • O

发现题目背景和洛谷 2022 愚人节的 O 很像。

2022 年洛谷愚人节比赛是一场公开赛。

所以是【LGR-(-14) 】2022 年洛谷愚人节比赛,举行在 20222022 年 33 月 2727 日,unrated。

  • P

题目里有一个 So we come to 17th Mar. 2017.,可惜并不是。

考察一重到九重【注:查看 P 题题解】,但发现都没有。

第二次利用标题,发现是妄想 Paranoia 的发布日期,也就是 20172017 年 11 月 2828 日的【LGR-032】洛谷2017春节联欢赛 Hello Dingyou,unrated。

  • R

复制 markdown,发现 Not Wordle\color{#18dec1}\texttt{Not Wordle} 是 #18dec1 色的,也就是 18/Dec./1。

于是就是 20182018 年 1212 月 11 日的 NOIP 考后欢乐赛,unrated。

  • T

中间那个格子有什么用呢?August。

范围太大啦!

发现 Y.Florida Alsop 在本题进行了一个 RE 的提交,联想到什么?

REOI。

因此是 20222022 年 88 月 66 日的【LGR-115】洛谷 8 月月赛 I & 终末祭 REOI Round 1,rated。

  • U

观察样例。

connect 意思是连接,把本题中所有的数字连起来,即为 10161016,也就是 1010 月 1616 日。

last before today 的即为 20222022 年 1010 月 1616 日的挖土机杯 CSP-J 组模拟赛 R2,rated。

  • V

观察样例输出,不难发现是 20222022 年 77 月 3131 日的终末祭&REOI PreRound 1。

C++
#include <bits/stdc++.h>
using namespace std;
int main()
{
	printf("A 2021-04-04 No\n");
	printf("B 2022-11-30 No\n");
	printf("D 2021-12-14 No\n");
	printf("E 2021-12-07 No\n");
	printf("F 2019-06-25 Yes\n");
	printf("G 2022-04-02 Yes\n");
	printf("I 2021-08-14 Yes\n");
	printf("J 2018-10-24 No\n");
	printf("N 2016-07-27 No\n");
	printf("O 2022-03-23 No\n");
	printf("P 2017-01-24 No\n");
	printf("R 2018-11-27 No\n");
	printf("T 2022-08-02 Yes\n");
	printf("U 2022-10-12 Yes\n");
	printf("V 2022-07-27 No\n");
	return 0;
}
原文
存档评论2 条抓取于