
STL
wxb_blog
语音识别算法工程师
展开
-
TOJ A+B Problem
You know that the first problem of an online judge system should be the "A+B Problem", but TOJ not. What a terrible! So now it comes... Given a series of numbers, your task is to find the largest num原创 2013-10-06 15:28:39 · 1335 阅读 · 0 评论 -
字符串排序
题目1135:字符串排序 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:1036 解决:519 题目描述: 先输入你要输入的字符串的个数。然后换行输入该组字符串。每个字符串以回车结束,每个字符串少于一百个字符。 如果在输入过程中输入的一个字符串为“stop”,也结束输入。 然后将这输入的该组字符串按每个字符串的长度,由小到大原创 2013-12-02 10:52:31 · 1587 阅读 · 0 评论 -
Bitset 类小议
一个简单的例子: #include #include #include #include using namespace std; int main() { cout::digits>(267) cout::digits>(267) cout(1e7) cout(string("1000101011")).to_ulong()原创 2013-12-01 09:42:27 · 954 阅读 · 0 评论 -
翻转单词顺序
题目描述:JOBDU最近来了一个新员工Fish,每天早晨总是会拿着一本英文杂志,写些句子在本子上。同事Cat对Fish写的内容颇感兴趣,有一天他向Fish借来翻看,但却读不懂它的意思。例如,“student. a am I”。后来才意识到,这家伙原来把句子单词的顺序翻转了,正确的句子应该是“I am a student.”。Cat对一一的翻转这些单词顺序可不在行,你能帮助他么? 输入: 每原创 2013-11-20 11:29:07 · 1146 阅读 · 0 评论 -
STL容器学习第一天
容器:管理序列的类,通过容器类提供的成员函数,实现各中队序列中元素的操作。 STL提供了各种容器类模板,通常这些模板类包括:向量(vector),列表(list),双队列(deque),集合(set),多重集合(multiset),映射(map),多重映射(multimap)。 vector可以认为是动态数组;list是由节点组成的双线列表,每个节点包括一个元素;双队列(deq原创 2013-10-29 13:04:59 · 982 阅读 · 0 评论 -
Change Base
Given an integer m in base B (2 ≤ B ≤ 10) (m contains no more than 1000 digits), find the value of the integer m in base 10, output the result modulo 10007. Input The first line of the input is a原创 2013-10-15 21:20:25 · 1088 阅读 · 0 评论 -
TJU Bitwise Reverse
Professor Robby invents a powerful encryption method, but he is too lazy to implement it. So he turns to you for help. In fact, the encryption method is only applied to positive integers. At first, w原创 2013-10-13 19:12:21 · 1058 阅读 · 0 评论 -
TJU Counting Letters
As a talented student, your boss gave you a task. Given a text string, you should find out which letters appear most frequently. Really simple, isn't it? Input The first line of the input is the nu原创 2013-10-12 23:03:18 · 1265 阅读 · 0 评论 -
TJU Super Square
If N Ns are added together, we know that it's the square of N. Well, if N Ns are multiplied together, we call it a super square of N. For example, the square of 3 is 3+3+3=9, while the super square原创 2013-10-10 22:31:42 · 1073 阅读 · 0 评论 -
TJU Price
Ant is a student in Tianjin University. Everyday, he has to go to the restaurant in school. Recently, some other students complain about the high price of restaurant dishes. Ant is a poor man, he do原创 2013-10-09 11:54:40 · 638 阅读 · 0 评论 -
TJU Count the factors
The Problem Write a program, that computes the number of different prime factors in a positive integer. The Input The input tests will consist of a series of positive integers. Each number is on a原创 2013-10-07 19:10:05 · 857 阅读 · 0 评论 -
TJU Vacation
Z is planning to visit the Tourist Kingdom for M days. This kingdom is full of lovely cities. During his stay Z would like to visit as many different cities as possible. He cannot visit more than on原创 2013-10-06 22:07:45 · 727 阅读 · 0 评论 -
把一整数转换为字符串
itoa 功 能:把一整数转换为字符串 用 法:char *itoa(int value, char *string, int radix); 详细解释:itoa是英文integer to array(将int整型数转化为一个字符串,并将值保存在数组string中)的缩写. 参数: value: 待转化的整数。 radix: 是基数的意思转载 2014-06-02 20:54:51 · 2901 阅读 · 0 评论