I. Base62(高精度进制转换) 比赛当时雷菊苣和队长俩人拿着大数板子摸了一百多行(然后在缺少大数板子的情况下雷菊苣一发过了orz) 今天补题随便摸了个高精度进制转换的板子交上去就过了还贼短,, 我好菜,佬们好厉害 ; int t[maxn], A[maxn]; char str1[maxn], str2[maxn]; int n, m; void solve() { int i, len, k; len = strlen(str1); ; --i) t[len--i] = str1[i]
You're given a permutation aa of length nn (1 \le n \le 10^51≤n≤105). For each i \in [1,n]i∈[1,n], construct a sequence s_isi by the following rules: s_i[1]=isi[1]=i; The length of s_isi is nn, and for each j \in [2, n]j∈[2,n], s_i[j] \le s_i[j-1]
As the current heir of a wizarding family with a long history,unfortunately, you find yourself forced to participate in the cruel Holy Grail War which has a reincarnation of sixty years.However,fortunately,you summoned a Caster Servant with a powerfu
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=4803 Problem Description Jenny is a warehouse keeper. He writes down the entry records everyday. The record is shown on a screen, as follow:There are only two buttons on the screen. Pressing the button i
Comet OJ 2019 夏季欢乐赛题解 我是来骗访问量的 A 完全k叉树 \(n\)个点的完全k叉树的直径. 直接做 B 距离产生美 直接做 C 烤面包片 \(n!!!\mod p\) 显然\(n\)太大就是0,不然直接暴力 D 茶颜悦色 原题 E 飞行棋 最后肯定是起点->最后\(k\)个点->终点(弹回去->..->弹回去->..->终点) 矩乘做出起点到最后\(k\)个点的概率\(f_i\)与期望步数\(g_i\). 最后\(k\)个点任意一个点走到终点的期望
2019 ICPC Asia Nanjing Regional A - Hard Problem 计蒜客 - 42395 若 n = 10,可以先取:6,7,8,9,10.然后随便从1,2,3,4,5里面选一个都肯定符合题意 若 n = 9,可以先取:5,6,7,8,9,然后随便从1,2,3,4里面选一个都肯定符合题意. 所以答案就是后半部分的数量+1 #include <cstdio> #include <iostream> #include <cmath> #inc
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4811 题目描述: Problem Description Jenny likes balls. He has some balls and he wants to arrange them in a row on the table. Each of those balls can be one of three possible colors: red, yellow, or blue. More