1465 - CS I2P 2018 Lee Mid 2 Scoreboard

Time

2018/05/18 15:50:00 2018/05/18 17:50:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
11183 The Longest Palindrome - partial
11462 cppreference
11929 Reorder (absolute value)
11931 Least Common Multiple

11183 - The Longest Palindrome - partial   

Description

A palindrome is a string that is identical to its reverse, like "level" or "aba".  In this problem, some strings are given, and the longest palindrome in each string should be computed.

This problem involves three files:

1. 11183.c: the source file containing the main function and calls ispal().

2. 11183.h: the header file that gives the prototype of function ispal(). 

3. your answer as a C source file, in which you should implement the ispal() function to determine whether a given string is a palindrome or not.  

Please check the provided files for details.

Input

The input consists of multiple lines, and each of them is a string that contains alphabets and numbers. 

The length of each string is less than 1000 and larger or equal to 1. 

The number of lines is less than or equal to 100.

Output

The longest palindrome in each string should be outputted.

If there are many palindromes of the same length, output the first one in the string.

Sample Input  Download

Sample Output  Download

Partial Judge Code

11183.c

Partial Judge Header

11183.h

Tags




Discuss




11462 - cppreference   

Description

版本:

20180311

 

使用說明:

請下載code或header(兩個是同個檔案)

把附檔名從.cpp改成.zip

解壓縮後

reference>en>cpp.html

即可看到官方文件

Input

Output

Sample Input  Download

Sample Output  Download

Partial Judge Code

11462.cpp

Partial Judge Header

11462.h

Tags

CPP Reference



Discuss




11929 - Reorder (absolute value)   

Description

Given four integer numbers, please rearrange the value of them in increasing order according to their absolute value.

Input

The input has four integer numbers num1, num2, num3, and num4.

Output

Print num1, num2, num3, num4 sequentially, and the output should be in increasing order according to their absolute value.

If the absolute value of numbers are the same, put the negative number in front.

Sample Input  Download

Sample Output  Download

Partial Judge Code

11929.c

Partial Judge Header

11929.h

Tags




Discuss




11931 - Least Common Multiple   

Description

In this problem, you are required to calculate the Least Common Multiple (最小公倍數).

Input

The input contains 2 positive integers in a line which are not greater than 1000000.

Output

The Least Common Multiple of the input numbers. The answer is smaller than 2147483647.

Note that you do not need to print ‘\n’ at the end of the output.

Sample Input  Download

Sample Output  Download

Tags




Discuss