309514: CF1692A. Marathon

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:4 Solved:0

Description

Marathon

题意翻译

## 题意简述 四个人在马拉松比赛中分别跑了 $a, b, c, d$ 米,**保证四个数两两不同**,问比第一个人(跑 $a$ 米的那个)跑得更远的人有几个。 本题多测,第一行为测试数据组数 $t$,接下来 $t$ 行每行四个整数 $a, b, c, d$。

题目描述

You are given four distinct integers $ a $ , $ b $ , $ c $ , $ d $ . Timur and three other people are running a marathon. The value $ a $ is the distance that Timur has run and $ b $ , $ c $ , $ d $ correspond to the distances the other three participants ran. Output the number of participants in front of Timur.

输入输出格式

输入格式


The first line contains a single integer $ t $ ( $ 1 \leq t \leq 10^4 $ ) — the number of test cases. The description of each test case consists of four distinct integers $ a $ , $ b $ , $ c $ , $ d $ ( $ 0 \leq a, b, c, d \leq 10^4 $ ).

输出格式


For each test case, output a single integer — the number of participants in front of Timur.

输入输出样例

输入样例 #1

4
2 3 4 1
10000 0 1 2
500 600 400 300
0 9999 10000 9998

输出样例 #1

2
0
1
3

说明

For the first test case, there are $ 2 $ people in front of Timur, specifically the participants who ran distances of $ 3 $ and $ 4 $ . The other participant is not in front of Timur because he ran a shorter distance than Timur. For the second test case, no one is in front of Timur, since he ran a distance of $ 10000 $ while all others ran a distance of $ 0 $ , $ 1 $ , and $ 2 $ respectively. For the third test case, only the second person is in front of Timur, who ran a total distance of $ 600 $ while Timur ran a distance of $ 500 $ .

Input

题意翻译

## 题意简述 四个人在马拉松比赛中分别跑了 $a, b, c, d$ 米,**保证四个数两两不同**,问比第一个人(跑 $a$ 米的那个)跑得更远的人有几个。 本题多测,第一行为测试数据组数 $t$,接下来 $t$ 行每行四个整数 $a, b, c, d$。

Output

**题目:马拉松**

**题意简述:**
四个人在马拉松比赛中分别跑了 $a, b, c, d$ 米,保证四个数两两不同,问比第一个人(跑 $a$ 米的那个)跑得更远的人有几个。

本题多测,第一行为测试数据组数 $t$,接下来 $t$ 行每行四个整数 $a, b, c, d$。

**题目描述:**
你给定四个不同的整数 $a, b, c, d$。Timur和其他三个人正在跑马拉松。$a$ 是Timur跑的距离,$b, c, d$ 分别对应其他三个参与者的距离。

输出Timur前面有多少个参与者。

**输入输出格式:**

**输入格式:**
第一行包含一个整数 $t$ ( $1 \leq t \leq 10^4$ ) —— 测试用例的数量。
每个测试用例包含四个不同的整数 $a, b, c, d$ ( $0 \leq a, b, c, d \leq 10^4$ )。

**输出格式:**
对于每个测试用例,输出一个整数 —— Timur前面的参与者数量。

**输入输出样例:**

**输入样例 #1:**
```
4
2 3 4 1
10000 0 1 2
500 600 400 300
0 9999 10000 9998
```

**输出样例 #1:**
```
2
0
1
3
```

**说明:**
对于第一个测试用例,Timur前面有2个人,具体是跑了3米和4米的参与者。另一个人没有在Timur前面,因为他跑的距离比Timur短。

对于第二个测试用例,没有人Timur前面,因为他跑了10000米,而其他人都分别跑了0米,1米和2米。

对于第三个测试用例,只有第二个人在Timur前面,他跑了总共600米,而Timur跑了500米。**题目:马拉松** **题意简述:** 四个人在马拉松比赛中分别跑了 $a, b, c, d$ 米,保证四个数两两不同,问比第一个人(跑 $a$ 米的那个)跑得更远的人有几个。 本题多测,第一行为测试数据组数 $t$,接下来 $t$ 行每行四个整数 $a, b, c, d$。 **题目描述:** 你给定四个不同的整数 $a, b, c, d$。Timur和其他三个人正在跑马拉松。$a$ 是Timur跑的距离,$b, c, d$ 分别对应其他三个参与者的距离。 输出Timur前面有多少个参与者。 **输入输出格式:** **输入格式:** 第一行包含一个整数 $t$ ( $1 \leq t \leq 10^4$ ) —— 测试用例的数量。 每个测试用例包含四个不同的整数 $a, b, c, d$ ( $0 \leq a, b, c, d \leq 10^4$ )。 **输出格式:** 对于每个测试用例,输出一个整数 —— Timur前面的参与者数量。 **输入输出样例:** **输入样例 #1:** ``` 4 2 3 4 1 10000 0 1 2 500 600 400 300 0 9999 10000 9998 ``` **输出样例 #1:** ``` 2 0 1 3 ``` **说明:** 对于第一个测试用例,Timur前面有2个人,具体是跑了3米和4米的参与者。另一个人没有在Timur前面,因为他跑的距离比Timur短。 对于第二个测试用例,没有人Timur前面,因为他跑了10000米,而其他人都分别跑了0米,1米和2米。 对于第三个测试用例,只有第二个人在Timur前面,他跑了总共600米,而Timur跑了500米。

加入题单

算法标签: