/
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 200 点
問題文
フリーマーケットで、売り主の高橋君は N 個の商品を左から順に並べています。 i 番目の商品の値段は A_i 円です。
客の青木君は X 円までなら買ってもよいと考えています。各商品について、値段が X 円以下なら o 、そうでなければ x として、左の商品から順に並べた長さ N の文字列を出力してください。
制約
- 1 \leq N \leq 100
- 1 \leq X \leq 10000
- 1 \leq A_i \leq 10000
- 入力はすべて整数
入力
入力は以下の形式で標準入力から与えられる。
N X A_1 A_2 \ldots A_N
- 1 行目には、商品の個数 N と青木君の予算 X がスペース区切りで与えられる。
- 2 行目には、各商品の値段 A_1, A_2, \ldots, A_N がスペース区切りで与えられる。
出力
長さ N の文字列を 1 行で出力せよ。
入力例 1
5 500 300 800 450 1200 100
出力例 1
oxoxo
入力例 2
3 100 200 300 400
出力例 2
xxx
入力例 3
2 9000 1 8999
出力例 3
oo
入力例 4
1 500 499
出力例 4
o
入力例 5
5 500 300 1 450 1200 100
出力例 5
oooxo
Score : 200 pts
Problem Statement
At a flea market, the seller Takahashi has lined up N items in order from left to right. The price of the i-th item is A_i yen.
Aoki, a customer, is willing to buy an item as long as it costs at most X yen. For each item, let the character be o if its price is at most X yen and x otherwise, and output the string of length N formed by arranging these characters in order from the leftmost item.
Constraints
- 1 \leq N \leq 100
- 1 \leq X \leq 10000
- 1 \leq A_i \leq 10000
- All input values are integers.
Input
The input is given from Standard Input in the following format:
N X A_1 A_2 \ldots A_N
- The first line contains the number of items N and Aoki's budget X, separated by a space.
- The second line contains the prices A_1, A_2, \ldots, A_N of the items, separated by spaces.
Output
Output a string of length N in a single line.
Sample Input 1
5 500 300 800 450 1200 100
Sample Output 1
oxoxo
Sample Input 2
3 100 200 300 400
Sample Output 2
xxx
Sample Input 3
2 9000 1 8999
Sample Output 3
oo
Sample Input 4
1 500 499
Sample Output 4
o
Sample Input 5
5 500 300 1 450 1200 100
Sample Output 5
oooxo