Choosing Laptop

题意翻译

## 题目描述 Vasya想购买一台笔记本电脑。商场提供了n台电脑给顾客体验。 Vasya只对以下三个电脑指标比较感兴趣:CPU速度,内存和硬盘。因为Vasya是一个程序员而不是游戏玩家,因此他对其他指标并不感兴趣。 如果一台电脑的三个指标都小于另一台电脑,那么Vasya认为这台电脑是过时的。Vasya不考虑那些过时的电脑,他会在其他(不过时)电脑中选择一台最便宜的。 ## 输入输出格式 ### 输入格式: 第一行是一个整数n ( 1<=n<=100 1<=n<=100 ). 以下n行中每一行包括四个整数,分别是电脑的speed(cpu速度)、ram(内存大小)、hdd(硬盘容量)和cost(价格)。 1000<=speed<=4200 256<=ram<=4096 1<=hdd<=500 100<=cost<=1000 所有的电脑有不同的价格。 ### 输出格式: 输出一个整数,即Vasya选择电脑的序号(范围在1-n之间)。 输入输出样例 ## 说明 第一和第五台电脑是过时的,因为它们的三个指标都小于第三台。剩下的电脑中第四台最便宜,因此,输出是4。

题目描述

Vasya is choosing a laptop. The shop has $ n $ laptops to all tastes. Vasya is interested in the following properties: processor speed, ram and hdd. Vasya is a programmer and not a gamer which is why he is not interested in all other properties. If all three properties of a laptop are strictly less than those properties of some other laptop, then the first laptop is considered outdated by Vasya. Among all laptops Vasya does not consider outdated, he chooses the cheapest one. There are very many laptops, which is why Vasya decided to write a program that chooses the suitable laptop. However, Vasya doesn't have his own laptop yet and he asks you to help him.

输入输出格式

输入格式


The first line contains number $ n $ ( $ 1<=n<=100 $ ). Then follow $ n $ lines. Each describes a laptop as $ speed $ $ ram $ $ hdd $ $ cost $ . Besides, - $ speed $ , $ ram $ , $ hdd $ and $ cost $ are integers - $ 1000<=speed<=4200 $ is the processor's speed in megahertz - $ 256<=ram<=4096 $ the RAM volume in megabytes - $ 1<=hdd<=500 $ is the HDD in gigabytes - $ 100<=cost<=1000 $ is price in tugriks All laptops have different prices.

输出格式


Print a single number — the number of a laptop Vasya will choose. The laptops are numbered with positive integers from $ 1 $ to $ n $ in the order in which they are given in the input data.

输入输出样例

输入样例 #1

5
2100 512 150 200
2000 2048 240 350
2300 1024 200 320
2500 2048 80 300
2000 512 180 150

输出样例 #1

4

说明

In the third sample Vasya considers the first and fifth laptops outdated as all of their properties cannot match those of the third laptop. The fourth one is the cheapest among the laptops that are left. Thus, Vasya chooses the fourth laptop.