1598. 输入输出练习 (Hard)

See input / output section for more details.

输入

The first line contains a single integer n (1n1000)n \ (1 \leq n \leq 1000).

The second line contains nn integers a1,a2,...,an (1ai109)a_1,a_2,...,a_n \ (1 \leq a_i \leq 10^9), representing array aa.

The third line contains nn lowercase letters b1,b2,...,bnb_1,b_2,...,b_n, representing array bb.

The fourth line contains a string ss which consists of lowercase letters and spaces. It is guaranteed that the length of ss will not exceed 10001000.

The fifth line contains a sequence of integers c1,c2,c3,... (1ci109)c_1,c_2,c_3,... \ (1 \leq c_i \leq 10^9), terminated by end-of-file, representing array cc. It is guaranteed that the length of cc will not exceed 10001000.

输出

In the first line of the output, print the value of i=1nai\sum_{i=1}^{n}a_i.

In the second line of the output, if all 2626 lowercase letters are presented in array bb, output YES. Otherwise output NO.

In the third line of the output, print the length of string ss.

In the fourth line of the output, print the length of array cc.

样例

标准输入 复制文本
6
1 1 4 5 1 4
h e h h e h
nun heh heh aaaaaaaaaaaaaaaaaaaaaaa
114514 1919810
标准输出 复制文本
16
NO
35
2

提示

If you get wrong answer in this problem, there must be an issue with this OJ (doge).

登录以提交代码。
单点时限 1 秒
内存限制 128 MB
提交 357
通过 65