Codeforces Round #786 (Div. 3)
Monday, May 2, 2022 at 22:35UTC+8
上次浪费了大量时间写博客,这次不会了。
好恐怖,这次居然有6到8道题
“有预期难度”
其实就算没有预期难度爆零也是肯定的啦!
让我们一起勇敢地去爆零吧!
So, the dictionary looks like that:
You are given a word ss from the Berland language. Your task is to find its index in the dictionary.
Input
The first line contains one integer tt (1≤t≤6501≤t≤650) — the number of test cases.
Each test case consists of one line containing ss — a string consisting of exactly two different lowercase Latin letters (i. e. a correct word of the Berland language).
Output
For each test case, print one integer — the index of the word ss in the dictionary.
-
给你两个整数 x 和 y。您想选择两个严格的正(大于零)整数 a 和 b,然后将以下操作应用于 x 恰好 a 次:将 x 替换为 b⋅x。
您想找到两个正整数 a 和 b,使得在此过程之后 x 等于 y。如果有多个可能的对,您可以选择其中任何一个。如果没有这样的对,请报告。
例如:
如果x=3,y=75,可以选择a=2,b=5,这样x就等于3⋅5⋅5=75;
如果x=100,y=100,可以选择a=3,b=1,这样x就等于100⋅1⋅1⋅1=100;
如果 x=42 且 y=13,则没有答案,因为您不能使用给定的操作减少 x。
输入
第一行包含一个整数 t (1≤t≤104)——测试用例的数量。每个测试用例由一行组成,其中包含两个整数 x 和 y (1≤x,y≤100)。
输出
如果可以选择一对正整数 a 和 b,使 x 在上述过程后变为 y,则打印这两个整数。您打印的整数应不小于 1 且不大于 109(可以证明,如果答案存在,则存在一对满足这些约束的整数 a 和 b)。如果有多个这样的对,打印其中任何一个。如果不可能选择一对整数 a 和 b 以使 x 变为 y,则打印整数 0 两次。
-
The Berland language consists of words having exactly two letters. Moreover, the first letter of a word is different from the second letter. Any combination of two different Berland letters (which, by the way, are the same as the lowercase letters of Latin alphabet) is a correct word in Berland language.
The Berland dictionary contains all words of this language. The words are listed in a way they are usually ordered in dictionaries. Formally, word aa comes earlier than word bb in the dictionary if one of the following conditions hold:
- the first letter of aa is less than the first letter of bb;
- the first letters of aa and bb are the same, and the second letter of aa is less than the second letter of bb.
- Word 11: ab
- Word 22: ac
- ...
- Word 2525: az
- Word 2626: ba
- Word 2727: bc
- ...
- Word 649649: zx
- Word 650650: zy
#include<bits/stdc++.h>
using namespace std;
void solve(int x,int y){
}
int main(){
int t,x,y;
cin>>t;
for(int i=1;i<=n;i++){
cin>>x>>y;
solve(x,y);
}
return 0;
}
先搞个这个,易证
if(y%x!=0)cout<<"0 0"<<endl;
但是大家很快发现它没说a不能等于1对吧,所以说。。。
神马辣鸡CF怎么这种题都出出来了
劳资要是早点反应过来就好了
白白浪费了我将近一个小时
第二题那个翻译有点离谱,大家就直接看原文吧
水题一道,但是这一开始对于我来说并不是水题。我真的字符特别弱,什么都记不清了,一提字符脑子里一头雾水。我于是现场重新学字符,把那个多少年前的PPT翻出来重读,上网搜如何char转int,敲了个模板粗心大意少打了输入又在濒临灵异事件之际成功debug,最终在还剩20分钟时成功AC,打破了字符不可战胜的神话。
其实这次没有爆零就非常庆幸了,第一题AC的时候真的超高兴,我本来只是想再来爆一次零的。不过确实是CF的问题,第一题给出成这样了。我一开始还不敢相信,看了好久才确认真的没说a不能等于1。是CF的问题啊。
好了,比赛结束,大吃一斤
我tm居然排了.........11642名?
my sun还不如上次爆零排七千多名
果真是水涨船高啊
不过话说这个排名到底是怎么回事啊
有没有觉得非常无理???
搞了好久才发现,原来这玩意它不是最终成绩,是个初步结果。
比如我上次爆零,初步结果是七千多名。然后等到最终结果出来了。。。
发现那其实是10534名啦那也比今天这个好啊
好吧那么,我们等明天结果出来再说吧。
确实今天这个题很水,但是由于上次留下的心理阴影,我认为不爆零就特别了不起了,后面的题更是读都没读。这个观念是错误的,水涨船高啊水涨船高,你说这七道题你不去至少AC个三道,有什么出息???
最后打个广告,看这个jiangly,是我们重庆西大附中的学子,目前在国家队+北大!
你看看别人,第一题7分钟搞定,虽然与周围人相比之下确实像是跟我一样一开始想复杂了,但是大多数人这个第一题消耗了>=半个小时!而我这个蒟蒻,花了50分钟!
再看看别人最后一道题,居然在32分钟时就AC了!现在去看他的个人资料,上次登录是两小时前了。大佬就是大佬,蒟蒻都是觉得两个小时时间不够,都结束这么久了还在这里写博客感叹自己的没出息。而别人,两个小时时间太长了,半个小时搞定就安安心心地下线睡觉了,反正那排名出来都肯定是名列前茅。
最后,蒟蒻想要告诉大家,感谢你看到这里。你要记住,上CF打比赛,最好不要用bits/stdc++.h,因为我今天提交的时候,报错了!