cf/mirror

Letters and Question Marks

CF
1327G2800· international gm4s1024 MB⌨ stdin/stdout

Examples

Sample 1of 5
Input
4
abc -10
a 1
b 1
c 3
?b?
Output
5
Sample 2of 5
Input
2
a 1
a 1
?
Output
2
Sample 3of 5
Input
3
a 1
b 3
ab 4
ab
Output
8
Sample 4of 5
Input
1
a -1
?????????????
Output
0
Sample 5of 5
Input
1
a -1
??????????????
Output
-1
1327G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)