时间限制:10000ms 单点时限:1000ms 内存限制:256MB Description Consider a string set that each of them consists of {0, 1} only. All strings in the set have the same number of 0s and 1s. Write a program to find and output the K-th string according to the dictionary…
题目1 : String reorder 时间限制:10000ms 单点时限:1000ms 内存限制:256MB Description For this question, your program is required to process an input string containing only ASCII characters between '0' and '9', or between 'a' and 'z' (including '0', '9', 'a', 'z'). Y…
Time Limit: 10000msCase Time Limit: 1000msMemory Limit: 256MB Description Consider a string set that each of them consists of {0, 1} only. All strings in the set have the same number of 0s and 1s. Write a program to find and output the K-th string ac…
T1: 题目描述 你正在使用过时的浏览器,洛谷暂不支持. 请 升级浏览器 以获得更好的体验! Bob 来到了一个 $n \times m$ 的网格中,网格里有 $k$ 个豆子,第 $i$ 个豆子位于 $(x_i, y_i)$,保证没有两个豆子在同一个格子里,$(1, 1)$ 处和 $(n, m)$ 处没有豆子. Bob 从左上角 $(1, 1)$ 出发,目的地是右下角 $(n, m)$.每次以向右或向下走一步,也就是说他到达终点时一共会走 $n + m - 2$ 步. 贪吃的 Bob 决定吃掉所…
Time Limit:10000ms Case Time Limit:1000ms Memory Limit:256MB Description For this question, your program is required to process an input string containing only ASCII characters between '0' and '9', or between 'a' and 'z' (including '0', '9', 'a', 'z'…
手有些生了. 题目: 通过键盘输入一串小写字母(a~z)组成的字符串.请编写一个字符串压缩程序,将字符串中连续出席的重复字母进行压缩,并输出压缩后的字符串.压缩规则:1.仅压缩连续重复出现的字符.比如字符串”abcbc”由于无连续重复字符,压缩后的字符串还是”abcbc”.2.压缩字段的格式为”字符重复的次数+字符”.例如:字符串”xxxyyyyyyz”压缩后就成为”3x6yz”.要求实现函数:void stringZip(const char *pInputStr, long lInputLe…
第一部分是单选题:40分钟答题时间. watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveG1oMTk1NA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt=""> watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveG1oMTk1NA==/font/5a6L5L2T/font…
参考:https://blog.csdn.net/qq_30076791/article/details/50573512 第3题: #include<bits/stdc++.h> using namespace std; ; void dfs(int di,int hu,int num) { &&hu==&&num==)//要注意审题!酒要喝光 { ans++; return; } if (di)//如果有店可遇到 { dfs(di-,hu,num*); }…
今天一共笔试了这四家,真累啊,上午10点小米,下午2点百度,下午3点PPTV,下午5点去哪儿,今天右手太酸了,打的都话了50左右,如果没面试通知,那我可亏大了 小米就三题: 1.一个数组,排序要求,所有奇数要排在偶数前面 2.对一个二叉排序树,转换成双向链表,只能调整指针指向,不能做其他任何改动. 3.输入一个字符串,含有+-*/和(),和0-9的数字,+-只作为运算符,不作为正负号,求该式的计算结果.如“1+3*(4-1)” 计算结果为10 百度三大题: 1.OSI7层协议,TCP/UDP不同…
一.计算亮灯的个数 描述:一条长廊里依次装有n(1≤n≤65535)盏电灯,从头到尾编号1.2.3.…n-1.n.每盏电灯由一个拉线开关控制.开始,电灯全部关着. 有n个学生从长廊穿过.第一个学生把号码凡是1的倍数的电灯的开关拉一下:接着第二个学生把号码凡是2的倍数的电灯的开关拉一下:接着第三个学生把号码凡是3的倍数的电灯的开关拉一下:如此继续下去,最后第n个学生把号码凡是n的倍数的电灯的开关拉一下.n个学生按此规定走完后,长廊里电灯有几盏亮着. 注:电灯数和学生数一致.不能写双重循环,会运行超…