微软实习生招聘及技术类秋令营招聘onlinetest编程题_web编程技术练习题

2020-02-28 实习报告 下载本文

微软实习生招聘及技术类秋令营招聘onlinetest编程题由刀豆文库小编整理,希望给你工作、学习、生活带来方便,猜你可能喜欢“web编程技术练习题”。

1.String reorder

Time Limit: 10000ms

Case Time Limit: 1000ms

Memory Limit: 256MB

Description

For this question, your program is required to proce an input string containing only ASCII characters between ‘0’ and ‘9’, or between ‘a’ and ‘z’(including ‘0’, ‘9’, ‘a’, ‘z’).Your program should reorder and split all input string characters into multiple segments, and output all segments as one concatenated string.The following requirements should also be met,1.Characters in each segment should be in strictly increasing order.For ordering, ‘9’ is larger than ‘0’, ‘a’ is larger than ‘9’, and ‘z’ is larger than ‘a’(basically following ASCII character order).2.Characters in the second segment must be the same as or a subset of the first segment;and every following segment must be the same as or a subset of its previous segment.Your program should output string “” when the input contains any invalid characters(i.e., outside the '0'-'9' and 'a'-'z' range).Input

Input consists of multiple cases, one case per line.Each case is one string consisting of ASCII characters.Output

For each case, print exactly one line with the reordered string based on the criteria above.Sample In

aabbccdd

007799aabbccddeeff113355zz

1234.89898

abcdefabcdefabcdefaaaaaaaaaaaaaabbbbbbbddddddee

Sample Out

abcdabcd

013579abcdefz013579abcdefz

Abcdefabcdefabcdefabdeabdeabdabdabdabdabaaaaaaa

2.K-th string

Time Limit: 10000ms

Case Time Limit: 1000ms

Memory 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 according to the dictionary order.If such a string doesn’t exist, or the input is not valid, please output “Impoible”.For example, if we have two ‘0’s and two ‘1’s, we will have a set with 6 different strings, {0011, 0101, 0110, 1001, 1010, 1100}, and the 4th string is 1001.Input

The first line of the input file contains a single integer t(1 ≤ t ≤ 10000), the number of test cases, followed by the input data for each test case.Each test case is 3 integers separated by blank space: N, M(2 = 0), K(1

Output

For each case, print exactly one line.If the string exists, please print it, otherwise print “Impoible”.Sample In2 22 77 47

Sample Out

0101

Impoible

01010111011

3.Reduce inversion count

Time Limit: 10000ms

Case Time Limit: 1000ms

Memory Limit: 256MB

Description

Find a pair in an integer array that swapping them would maximally decrease the inversion count of the array.If such a pair exists, return the new inversion count;otherwise returns the original inversion count.Definition of Inversion: Let(A[0], A[1]...A[n])be a sequence of n numbers.If i A[j], then the pair(i, j)is called inversion of A.Example:

Count(Inversion({3, 1, 2}))= Count({3, 1}, {3, 2})= 2

InversionCountOfSwap({3, 1, 2})=>

{

InversionCount({1, 3, 2})= 1

InversionCount({2, 1, 3})= 1

InversionCount({3, 2, 1})= 3

}

Input

Input consists of multiple cases, one case per line.Each case consists of a sequence of integers separated by comma.Output

For each case, print exactly one line with the new inversion count or the original inversion count if it cannot be reduced.Sample In

3,1,2

1,2,3,4,5

Sample Out

4.Most Frequent Logs

Time Limit: 10000ms

Case Time Limit: 3000ms

Memory Limit: 256MB

Description

In a running system, there're many logs produced within a short period of time, we'd like to know the count of the most frequent logs.Logs are produced by a few non-empty format strings, the number of logs is N(1=N=20000), the maximum length of each log is 256.Here we consider a log same with another when their edit distance(see note)is = 5.Also we have a)logs are all the same with each other produced by a certain format string b)format strings have edit distance5 of each other.Your program will be dealing with lots of logs, so please try to keep the time cost close to O(nl), where n is the number of logs, and l is the average log length.Note edit distance is the minimum number of operations(insertdeletereplace a character)required to transform one string into the other, please refer to httpen.wikipedia.orgwikiEdit_distance for more details.Input

Multiple lines of non-empty strings.Output

The count of the most frequent logs.Sample In

Logging started for id:1

Module ABC has completed its job

Module XYZ has completed its job Logging started for id:10

Module ? has completed its job

Sample Out

微软实习生招聘及技术类秋令营招聘onlinetest编程题

1.String reorderTime Limit: 10000msCase Time Limit: 1000msMemory Limit: 256MBDescriptionFor this question, your program is required to proce an input string con......

微软“智在未来”实习生招聘

2012微软“智在未来”实习生招聘2012微软“智在未来”实习生计划是为即将毕业于2013年的本科、硕士、博士学生量身打造的实习计划。  实习生职位:职位涵盖软件开发,技术支持等......

腾讯实习生招聘笔试题目(技术类)

1.第一题是软件工程中关于聚合在UML中的画法空心菱靠在整体类上2.有一个题是求一个图中最小生成树的权值总和3.有一个是根据后序和中序求树的先序遍历一个是关于sizeof的题......

实习生定位及招聘

北京诚济制药有限公司2014年实习生招聘计划一、生产中心:2014年预计招聘实习生25人,具体要求如下:1、QA:3名(男:2名女:1名)学历:本科专业:应用化学、药学、生物工程及药学相关专业2、......

腾讯投资类岗位实习生招聘

腾讯投资类岗位实习生招聘部门简介:腾讯的投资并购部,即腾讯产业共赢基金,主要使命是投资互联网产业链上的优质公司,更好地服务腾讯开放平台上的用户,主要关注网络游戏,社交网络,无......

《微软实习生招聘及技术类秋令营招聘onlinetest编程题.docx》
将本文的Word文档下载,方便收藏和打印
推荐度:
微软实习生招聘及技术类秋令营招聘onlinetest编程题
点击下载文档
相关专题 web编程技术练习题 实习生 秋令 微软 web编程技术练习题 实习生 秋令 微软
[实习报告]相关推荐
[实习报告]热门文章
下载全文