Anomynous 的愚人节比赛 2023 题解
MatrixGroup
·
·
个人记录
注:I 题题解在最后。
A. Anything is Useful
根据标题,\texttt{anything} 是有用的。(输入格式是小写字母字符串啊!!!)
趣事:被判断长度为 8 水过了。
#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,得到:
92 94 74
115 51 76
120 18 77
138 29 81
180 9 100
184 41 103
找规律时间到!
$94,51,18,29,\underline09,41,(35)$:$\sin4\approx-0.7568024953079282513726390\underline{94511829094135}912887336472571485416773
转化为颜色是 `#cf236a`,于是交 CF236A 的 AC 代码即可。
```cpp
#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\le v\le7)
- 一行一个正整数表示答案
- 标题叫做 Dynamic Blue
- 标签:贪心
为什么一道愚人节题目要有标签?
为什么数据范围写在了输入格式一边?
为什么标题叫做 Dynamic Blue?
考虑找到一道对应题目。
考虑找 Codeforces、蓝题、标签**有且仅有**动态~~树~~规划、贪心的题。
是 CF484D. Kindergarten。(注:CF1748A 是新题)
然后就发现没什么信息可以用了?别忘了 **OEIS**。
发挥一下**想象力**,搜索 [**kindergarten**](http://oeis.org/search?q=kindergarten&language=english&go=Search),发现了唯一一个数列。
$1\le v\le7$,就是它了!
```python
a=[0,1,3,4,6,8,10,12]
print(a[int(input())])
```
趣事:怎么这么多套数据的。
## E. Excited Day
考虑小数化分数。
$13.1\dot23376\dot6=\dfrac{2021}{154},15.31\dot0\dot6=\dfrac{2021}{132}$。
考虑 **Day** 的含义。发现日期可以写成 `YYYY/MM/DD` 的格式,考虑它们是 $Y\div M\div D$ 的结果。
于是各得到可能的日期是 `2021/7/22` 或 `2021/11/14` ,和 `2021/6/22`,`2021/11/12` 或 `2021/12/11`。
和 D 题一样,又是 $v(1\le v\le7)$,考虑 Codeforces。
除以 $100$ 是整数,考虑 `*difficulty`。
找对应日期 $7$ 题的比赛([1584](https://codeforces.com/contest/1584) 和 [1608](https://codeforces.com/contest/1608)),将对应的 `*difficulty` 相加(两个小数是相加的)即可。
```cpp
#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](https://codeforces.com/profile/Breakingtdasc) 指的是 Codeforces 用户名,输出 $0$ 即可。
```python
print(0+0+0)
```
## G. Guzhi is Useless
发现 $\tt 30322d022e212f18$ 是个十六进制字符串,**大数字出现在偶数位**,考虑两位一分割化为十进制,得到 $[48, 50, 45, 2, 46, 33, 47, 24]$。
发现都 $\le 50$,考虑是咕值排名,排名**对应**什么呢?标题暗示咕值是没用的,因此**考虑用户名**。
```text
wlzhouzhuan
xby070301
Bigjoker
yzy1
ve**orwyx
tzc_2012_awa
Eps**on_Cube
gxy001
```
发现有的看不清了,没有关系,**猜想只和第一个字母有关**(为什么不是最后一个?可以猜猜,实在不行试一下。),得到 `wxByvtEg`。$8$ 位,猜测是剪贴板代码,**记得化为小写**,得到[这个](https://www.luogu.com.cn/paste/wxbyvteg)。
诶怎么不对啊,诶怎么只有一个测试点啊,哦原来是输出样例。
```python
print('81f212e220d22303')
```
## J. Jramo Asektmi
发现字母被打乱啦!题面应该是:
```text
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.
```
于是交了一个排序。为啥过不了?
观察样例和标题。发现**数**(包括 $n$)也会被打乱。比如 $13\to31$。
于是就做完了。
```cpp
#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 号?好像没什么特别的。但是 **Fi**fth **Dec**emeber 会让你想到什么?**Fi**bonacci **Dec**imal。
观察样例,$11\ 514$?$3178\textbf{11,514}229$。将 Fibonacci 数连在一起(`11235`),输出第 $l\sim r$ 个字符即可。
```cpp
#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
先算出来 $\bf 7.1$ 的答案,为 $2100$。
$100$ 的倍数?一定是凑好的,猜测是 `*difficulty`。
猜测小问是指 subtask,于是搜索 `(id)G1` 的 `*difficulty` 为 $2100$。
发现是 1185。输出本场题目的 `*difficulty` 即可。
```python
print(800,1200,1200,1700,1700,2000,2100,2100,2600)
```
## P. Paranoia
懂得都懂。(实际上你点开下面的链接也可以/xyx)
得到 $1,9,3,1,9,8$ 之后猜测是什么的编号。枚举发现是[题单](https://www.luogu.com.cn/training/193198)即可。
```python
print('DEliVER me paRAnoiA')
```
## R. Reversed Wordle
考虑猜**本质不同字母**个数不多的单词(即为 $3$ 个的)。
前三次靠人类智慧,后三次靠减少解空间即可。
(贪心也不是不可以)
```php
MUMMY
CIVIC
BOFFO
PAPAW
TWEET
SLYLY
```
## T. Time Limit Exceeded
格子 1:考察颜色,为 `#3FCEF2`。
格子 2:考虑剪贴板,[在这里](https://www.luogu.com.cn/paste/di49p624)。同时暗示格子 5 是没用的。
格子 3:考察角落的小字,为 `1f37d3`。
格子 4:答案是 Div2 和 6e9。Div2 不是十六进制? $\texttt{IV}=4$。
格子 6:传统艺能,使用油漆桶覆盖之。
格子 7:U 暗示 Unicode 码,鱼的 unicode 编码为 $40060$,前缀 `0x` 意味着转化为十六进制 `0x9c7c`(U+9c7c),$\texttt{X}=10=\tt a$。
格子 8:十年,decade。
格子 9:考察标题,time limit 817ms,加上 memory limit 293,即可。
```cpp
#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 是 *Arc*aea 中的潜力值,加上有**约束**这一项,考虑和 **ARC** 有关。
**以上这部分猜测能力强的同学可以跳过**
考虑 $\texttt{M??? 10}$ 是题目名,可以找到 ARC126。
答案在 $4400$ 内,恰好 $6$ 个数,猜测是 difficulty,在 [kenkoooo](https://kenkoooo.com/atcoder/#/table/) 上找到即可。
```python
print([0,465,1370,1824,2332,2766,3488][int(input())])
```
## V. Virtual Language
找出不同点和相同点:
```text
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])
```
于是就是
```cpp
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;
```
唯一的问题是数字是多少。因为输入 $12$ 个猜测 $zr=0,eee=11$。
发现 sx=**s**i**x**,egt=**e**i**g**h**t**,fv=**f**i**v**e,etc.
于是就做好了。
```cpp
#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
**提示:做出一些别的题是做此题的前提。**
根据题目意思,我们要找出 $15$ 场洛谷公开赛。
根据输出暗示,我们主要由日期入手。
- A
复制 Markdown。
发现有一段
```text
小 C 有一个物品。$%2021Apr.8
于是就是 $2021$ 年 $4$ 月 $8$ 日的 CoOI Round 1,unrated。
- B
找到那个剪贴板,日期为 $2022$ 年 $12$ 月 $4$ 日。
所以是 $2022$ 年 $12$ 月 $4$ 日的「DMOI」Round 1,unrated。
- D
输入格式有一段
>莎士比亚曾经在**二零二一年十二月十八日**提到过,人的一生是短的,但如果卑劣地过这一生,就太长了。
于是就是 $2021$ 年 $12$ 月 $18$ 日的 JRKSJ 的比赛 Round 3,unrated。
- E
发现原题解题过程中的两个日期 $2021/11/14$ 和 $2021/12/11$,$11/14$ 没有洛谷公开赛,$12/11$ 有。
因此是 $2021$ 年 $12$ 月 $11$ 日的 NtF Round 2,unrated。
- F
根据样例输入,显然是 $2019$ 年 $6$ 月 $29$ 日的 X Round 2,rated。
- G
对[答案图片](https://www.luogu.com.cn/paste/wxbyvteg)油漆桶,发现有个 Sunday。
哪个 Sunday?合理猜测比较靠近题面中图片截下的时间。
发现大部分更新在 $2022$ 年 $4$ 月 $4$ 日,猜测是 $4$ 月 $4$ 日之后截下的。
因此是 $2022$ 年 $4$ 月 $10$ 日的【LGR-106】洛谷 4 月月赛 & MCOI R8,rated。
- I
显然在样例当中。
等等,$2021$ 年 $8$ 月 $14$ 日的 [DCOI2021] CSP 模拟赛不是**unrated**吗?为什么是 `Yes`?
考察标题,是 **Is It Rated 减四**,因此**所有日期输出都需要倒退四天**。
因此是 $2021$ 年 $8$ 月 $18$ 日的 「Wdoi2021」Windy OI Round3,rated。
- J
样例输出应该是 `2 8 10`,结合输入是 $2018/10/28$。
但是这一天怎么有 $4$ 场公开赛?J 题提示有:
>注:样例**不保证**是正确的,直接的,中肯的,雅致的,客观的,完整的,立体的,全面的,辩证的,雅俗共赏的,一针见血的,直击要害的。
所以既然它们都是 unrated,你也不需要管是哪一场啦。
- N
显然在样例当中。因此是 $2016$ 年 $7$ 月 $31$ 日的【LGR-023】洛谷7月月赛暨“HansBug的救赎第2弹”,unrated。
- O
发现题目背景和洛谷 2022 愚人节的 O 很像。
**2022 年洛谷愚人节比赛是一场公开赛**。
所以是【LGR-(-14) 】2022 年洛谷愚人节比赛,举行在 $2022$ 年 $3$ 月 $27$ 日,unrated。
- P
题目里有一个 So we come to 17th Mar. 2017.,可惜并不是。
考察一重到九重【注:查看 P 题题解】,但发现都没有。
**第二次利用标题**,发现是妄想 Paranoia 的发布日期,也就是 $2017$ 年 $1$ 月 $28$ 日的【LGR-032】洛谷2017春节联欢赛 Hello Dingyou,unrated。
- R
复制 markdown,发现 $\color{#18dec1}\texttt{Not Wordle}$ 是 `#18dec1` 色的,也就是 18/Dec./1。
于是就是 $2018$ 年 $12$ 月 $1$ 日的 NOIP 考后欢乐赛,unrated。
- T
中间那个格子有什么用呢?August。
范围太大啦!
发现 [Y.Florida Alsop](https://www.luogu.com.cn/record/list?user=y_florida_alsop&page=1) 在本题进行了一个 RE 的提交,联想到什么?
REOI。
因此是 $2022$ 年 $8$ 月 $6$ 日的【LGR-115】洛谷 8 月月赛 I & 终末祭 REOI Round 1,rated。
- U
观察样例。
connect 意思是连接,**把本题中所有的数字连起来**,即为 $1016$,也就是 $10$ 月 $16$ 日。
last before today 的即为 $2022$ 年 $10$ 月 $16$ 日的挖土机杯 CSP-J 组模拟赛 R2,rated。
- V
观察样例输出,不难发现是 $2022$ 年 $7$ 月 $31$ 日的终末祭&REOI PreRound 1。
```cpp
#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;
}