SICAU-OJ: A|B】的更多相关文章

Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 给定一个整数,将他转换到罗马字符.同样这里的罗马字符不会超过1000(M),PS:关于罗马字符的介绍看我的这篇文章 :LeetCode OJ:Roman to Integer(转换罗马字符到整数) 这里的大体思路是这样的,例如对于罗马字符952来说,起答题的可以分成三个组成部分, 就…
火车进站 给定一个正整数N代表火车数量,0<N<10,接下来输入火车入站的序列,一共N辆火车,每辆火车以数字1-9编号.要求以字典序排序输出火车出站的序列号. 输入描述: 有多组测试用例,每一组第一行输入一个正整数N(0<N<10),第二行包括N个正整数,范围为1到9. 输出描述: 输出以字典序从小到大排序的火车出站序列号,每个编号以空格隔开,每个输出序列换行,具体见sample. 输入例子: 3 1 2 3 输出例子: 1 2 3 1 3 2 2 1 3 2 3 1 3 2 1解…
Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be reconstructed later in the same or another comput…
/*===================================== IP Address Time Limit:1000MS Memory Limit:30000KB Total Submit:3394 Accepted:1530 Special Judge Description Suppose you are reading byte streams from any device, representing IP addresses. Your task is to conve…
字符串合并处理 按照指定规则对输入的字符串进行处理. 详细描述: 将输入的两个字符串合并. 对合并后的字符串进行排序,要求为:下标为奇数的字符和下标为偶数的字符分别从小到大排序.这里的下标意思是字符在字符串中的位置. 对排训后的字符串进行操作,如果字符为‘0’——‘9’或者‘A’——‘F’或者‘a’——‘f’,则对他们所代表的16进制的数进行BIT倒序的操作,并转换为相应的大写字符.如字符为‘4’,为0100b,则翻转后为0010b,也就是2.转换后的字符为‘2’: 如字符为‘7’,为0111b…
题目描述 1.对输入的字符串进行加解密,并输出. 2加密方法为: 当内容是英文字母时则用该英文字母的后一个字母替换,同时字母变换大小写,如字母a时则替换为B:字母Z时则替换为a: 当内容是数字时则把该数字加1,如0替换1,1替换2,9替换0: 其他字符不做变化. 3.解密方法为加密的逆过程. 接口描述: 实现接口,每个接口实现1个基本操作: void Encrypt (char aucPassword[], char aucResult[]):在该函数中实现字符串加密并输出 说明: 1.字符串以…
素数对个数 题目描述若两个正整数的和为素数,则这两个正整数称之为“素数伴侣”,如2和5.6和13,它们能应用于通信加密.现在密码学会请你设计一个程序,从已有的N(N为偶数)个正整数中挑选出若干对组成“素数伴侣”,挑选方案多种多样,例如有4个正整数:2,5,6,13,如果将5和6分为一组中只能得到一组“素数伴侣”,而将2和5.6和13编组将得到两组“素数伴侣”,能组成“素数伴侣”最多的方案称为“最佳方案”,当然密码学会希望你寻找出“最佳方案”. 输入: 有一个正偶数N(N≤100),表示待挑选的自…
时间限制:1 秒内存限制:32 兆特殊判题:否提交:24102解决:6126 题目描述: Grading hundreds of thousands of Graduate Entrance Exams is a hard work. It is even harder to design a process to make the results as fair as possible. One way is to assign each exam problem to 3 independe…
Description 下面的程序输出结果是: A::Fun A::Do A::Fun C::Do 请填空: 程序代码如下 #include <iostream> using namespace std; class A { private: int nVal; public: void Fun() { cout << "A::Fun" << endl; } virtual void Do() { cout << "A::Do&…
Description 下面程序的输出结果是: destructor B destructor A 请完整写出 class A. 限制条件:不得为 class A 编写构造函数. #include <iostream> using namespace std; class A { // Your Code Here }; class B:public A { public: ~B() { cout << "destructor B" << endl;…