[ABC140F] Many Slimes】的更多相关文章

[CF618G]Combining Slimes 题意:一个长度为$1\times n$的网格,每次从最右侧往里推入一个数字1或2(数字会一直跑到最左边的空格子里),加入1的概率为p,2的概率为1-p.如果新加入的数与其左边的那个数相同,都=x,则将二者合并变成x+1.然后继续判断是否能与左边合并(跟2048差不多).问你当最后格子满时,整个网格中所有数的和的期望值. $n\le 10^9$ 题解:cf怎么总喜欢利用浮点数精度来出题啊?!(现在遍地都是模意义下的期望mod 998244353,这…
Time Limit: 2 sec / Memory Limit: 1024 MB Score : 200200 points Problem Statement Takahashi lives in another world. There are slimes (creatures) of 1000010000 colors in this world. Let us call these colors Color 1,2,...,100001,2,...,10000. Takahashi…
目录 @description@ @solution@ @part - 0@ @part - 1@ @part - 2@ @part - 3@ @accepted code@ @details@ @description@ 一行上摆有 n 个方格.每一次你可以在最右边的方格滴入一滴史莱姆.有 p 的概率该史莱姆大小为 1,有 (1 - p) 的概率该史莱姆大小为 2. 史莱姆会不断往左滚动,直到遇到另一个史莱姆或边界.假如遇到的是大小相同的史莱姆则合并,大小加一,继续往左滚动:否则直接停下. 等…
A. Slime Combining 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=2768 Description Your friend recently gave you some slimes for your birthday. You have n slimes all initially with value 1. You are going to play a game with these slimes. Initi…
A - Wilbur and Swimming Pool Time Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 596A Description After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the sha…
A - Snuke's favorite YAKINIKU -- #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define mp make_pair #define pb push_back #define space putchar(' ') #define enter putchar('\n') #define MAXN 40005 #define…
日常英语---十二.MapleStory/Monsters/Level 1-10(Horny Mushroom) 一.总结 一句话总结: horny-['hɔːnɪ]-adj.角的 Another mushroom of the variety that can't jump, like the Green Mushroom. Found in Henesys's Mushroom Forest. horny 英 ['hɔːnɪ]  美 ['hɔrni]  adj. 角的:角状的:淫荡的 n.…
补一发A的题解. A - Snuke's favorite YAKINIKU 题意: 输入字符串S,如果以YAKI开头输出Yes,否则输出No. #include<bits/stdc++.h> using namespace std; int main() { char s[20];cin>>s; int n=strlen(s); if(n<4)puts("No"); else { if(s[0]=='Y'&&s[1]=='A'&&…
A - Colorful Slimes 2 找相同颜色的一段,然后答案加上段长除2下取整 代码 #include <iostream> #include <cstdio> using namespace std; int N; int a[105]; int main() { scanf("%d",&N); for(int i = 1 ; i <= N ; ++i) { scanf("%d",&a[i]); } int…
AtCoder Grand Contest 004 A - Divide a Cuboid 翻译 给定一个\(A*B*C\)的立方体,现在要把它分成两个立方体,求出他们的最小体积差. 题解 如果有一条边是偶数显然可以均分,否分沿着最长边隔开. #include<iostream> using namespace std; int a,b,c; int main() { cin>>a>>b>>c; if(a%2==0||b%2==0||c%2==0) cout…