STL相关题目
sdau20163940
努力学习,天天向上!
展开
-
我的第一个c++程序
上机内容:c++程序的编译与运行上机目的:掌握简单C++程序的编辑、编译、连接和运行的一般过程我的程序:/** 程序的版权和版本声明部分:* Copyright (c) 2016, 信息学院* All rights reserved.* 文件名称:第一个c++程序* 作 者:邓华伟* 完成日期:2017年3月4日* 版 本 号:v1.0* 对任务及求解方法原创 2017-03-04 10:25:16 · 319 阅读 · 0 评论 -
全排列的递归算法!
程序:#include #include #include using namespace std;template void perm(T list[], int k, int m){//产生list[k:m]的所有排列 if (k==m) {//单元素排列 for (int i=0; i<=m; i++) cout << ' '<< list[i]; cout转载 2017-03-10 23:54:17 · 202 阅读 · 0 评论 -
L-12
DescriptionIn most languages, text is written from left to right. However, there are other languages where text is read and written from right to left. As a first step towards a program that automat原创 2017-03-11 15:25:06 · 192 阅读 · 0 评论 -
M-13
DescriptionAs part of an arithmetic competency program, your students will be given randomly generated lists of from 2 to 15 unique positive integers and asked to determine how many items in each li原创 2017-03-11 16:29:37 · 178 阅读 · 0 评论 -
T-20
DescriptionGiven positive integers B and N, find an integer A such that AN is as close as possible to B. (The result A is an approximation to the Nth root of B.) Note that AN may be less than, equ原创 2017-03-11 17:06:12 · 261 阅读 · 0 评论 -
N-14
DescriptionThe Antique Comedians of Malidinesia prefer comedies to tragedies. Unfortunately, most of the ancient plays are tragedies. Therefore the dramatic advisor of ACM has decided to transfigure原创 2017-03-11 23:36:38 · 187 阅读 · 0 评论 -
W-23
DescriptionTom's Meadow Tom has a meadow in his garden. He divides it into N * M squares. Initially all the squares were covered with grass. He mowed down the grass on some of the squares and原创 2017-03-13 00:06:42 · 193 阅读 · 0 评论 -
B-2
DescriptionWe all know that FatMouse doesn't speak English. But now he has to be prepared since our nation will join WTO soon. Thanks to Turing we have computers to help him.Input Specification原创 2017-03-13 08:38:22 · 266 阅读 · 0 评论 -
V-22
Jim is fond of reading books, and he has so many books that sometimes it's hard for him to manage them. So he is asking for your help to solve this problem.Only interest in the name, press year原创 2017-03-14 00:12:38 · 200 阅读 · 0 评论 -
Z-22
DescriptionWhen a Little White meets another Little White:Little White A: (Surprised) !Little White B: ?Little White A: You Little White know "SHDC"? So unbelievable!Little White B: You are原创 2017-03-14 08:27:09 · 357 阅读 · 0 评论 -
R-18
DescriptionPrime Number Definition An integer greater than one is called a prime number if its only positive divisors (factors) are one and itself. For instance, 2, 11, 67, 89 are prime numbers bu原创 2017-03-15 09:44:17 · 1257 阅读 · 0 评论 -
The kth great number(优先队列)
Problem GTime Limit : 2000/1000ms (Java/Other) Memory Limit : 65768/65768K (Java/Other)Total Submission(s) : 47 Accepted Submission(s) : 17Problem DescriptionXiao Ming and Xiao Bao原创 2017-08-25 23:36:54 · 293 阅读 · 0 评论 -
U-21
DescriptionMike is very lucky, as he has two beautiful numbers, 3 and 5. But he is so greedy that he wants infinite beautiful numbers. So he declares that any positive number which is dividable by 3原创 2017-03-10 23:40:44 · 199 阅读 · 0 评论 -
k-11
DescriptionLittle Bob likes playing with his box of bricks. He puts the bricks one upon another and builds stacks of different height. ``Look, I've built a wall!'', he tells his older sister Alice.原创 2017-03-10 22:42:51 · 229 阅读 · 0 评论 -
C++中的log10函数
上机内容:求两个数相加后的位数上机目的:我的程序:/** 程序的版权和版本声明部分:* Copyright (c) 2016, 信息学院* All rights reserved.* 文件名称:求两个数想加的位数* 作 者:邓华伟* 完成日期:2017年3月4日* 版 本 号:v1.0* 对任务及求解方法的描述部分:* 输入描述:无* 问题描述:无* 程序输原创 2017-03-04 11:21:06 · 14408 阅读 · 1 评论 -
谁考了第k名
1011:谁考了第k名 查看 提交 统计 提问 总时间限制: 1000ms 内存限制: 65536kB描述在一次考试中,每个学生的成绩都不相同,现知道了每个学生的学号和成绩,求考第k名学生的学号和成绩。输入第一行有两个整数,分别是学生的人数n(1≤n≤100),和求第k名学生的k(1≤原创 2017-03-04 18:51:42 · 11761 阅读 · 0 评论 -
H-08
DescriptionIn the 22nd Century, scientists have discovered intelligent residents live on the Mars. Martians are very fond of mathematics. Every year, they would hold an Arithmetic Contest on Mars (A原创 2017-03-08 19:12:40 · 280 阅读 · 0 评论 -
J-10
DescriptionYou may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or the film of the same name by Stanley Kubrick. In it a spaceship is sent from Earth to Saturn. The crew is原创 2017-03-08 19:54:53 · 230 阅读 · 0 评论 -
Y-25
DescriptionThe look and say sequence is defined as follows. Start with any string of digits as the first element in the sequence. Each subsequent element is defined from the previous one by "verba原创 2017-03-08 20:34:36 · 406 阅读 · 0 评论 -
DNA Sorting
题目描述:E - 05Crawling in process...Crawling failedTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmitStatusDescriptionOne measure of ``unsortedness'' in a seq原创 2017-03-05 21:09:41 · 308 阅读 · 0 评论 -
数制转换
问题描述:描述求任意两个不同进制非负整数的转换(2进制~16进制),所给整数在long所能表达的范围之内。不同进制的表示符号为(0,1,...,9,a,b,...,f)或者(0,1,...,9,A,B,...,F)。输入输入只有一行,包含三个整数a,n,b。a表示其后的n 是a进制整数,b表示欲将a进制整数n转换成b进制整数。a,b是十进制整数,2 =输出输原创 2017-03-05 23:25:53 · 283 阅读 · 0 评论 -
S - 19
DescriptionMessage queue is the basic fundamental of windows system. For each process, the system maintains a message queue. If something happens to this process, such as mouse click, text change, t原创 2017-03-20 00:24:05 · 258 阅读 · 0 评论 -
P - 16
DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.The warehouse has N rooms. The i-th room contains J[i]原创 2017-03-20 00:36:43 · 455 阅读 · 0 评论 -
x-24
题目描述:DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let's say the phone catalogue listed these numbers:- Emerge原创 2017-03-06 19:48:37 · 277 阅读 · 0 评论 -
o-15
DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over,原创 2017-03-10 18:32:54 · 236 阅读 · 0 评论 -
hihocoder 1366 : 逆序单词(STL的运用)
时间限制:10000ms单点时限:1000ms内存限制:256MB描述在英文中有很多逆序的单词,比如dog和god,evil和live等等。现在给出一份包含N个单词的单词表,其中每个单词只出现一次,请你找出其中有多少对逆序单词。输入第1行:1个整数,N,表示单词数量。2≤N≤50,000。第2..N+1行:每行1个单词,只包含小写字母,每个单词长度不超过16个字母。保证每个单词只出现一次,且不会出...原创 2018-03-18 16:50:29 · 283 阅读 · 0 评论