[USACO 2006 Ope l]Scrambled Strings
题号:NC25106
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
64bit IO Format: %lld

题目描述

Given a pair of strings, each 80 or fewer characters in length, determine two things:
* The number of non-blank characters in the first string
* Whether the first string can be rearranged to form the second string.
The input strings will contain only letters (potentially both upper and lower case), digits, and spaces. 'Rearrangement' means strict reordering; no character can be changed, deleted, or added.

输入描述:

Line 1: String 1.
Line 2: String 2.

输出描述:

Line 1: The length of the first string
Line 2: A single character: y or n. 'y' means "yes, the first string can be rearranged to form the second". 'n' means otherwise.
示例1

输入

复制
computers are fun
future mac person

输出

复制
15
y

说明

The first string has 15 non-blank characters and can be rearranged to form the second string.