FZU 1350 Very Simple Problem
Very Simple Problem
Time Limit:1s
Memory limit:32M
Accepted Submit:111
Total Submit:317
During a preparation of programming contest, its jury is usually faced with many difficult tasks. One of them is to select a problem simple enough to most, if not all, contestants to solve. The difficulty here lies in diverse meanings of the term "simple"amongst the jury members. So, the jury uses the following procedure to reach a consensus: each member weights each proposed problem with a positive integer "complexity rating"(not necessarily different for different problems). The jury member calls "simplest"those problems that he gave the minimum complexity rating, and "hardest"those problems that he gave the maximum complexity rating. The ratings received from all jury members are then compared, and a problem is declared as "very simple", if it was called as "simplest"by more than a half of the jury, and was called as "hardest"by nobody. Input The first line of input file contains integers N and P, the number of jury members and the number of problems. The following N lines contain P integers in range from 0 to 1000 each - the complexity ranks. 1 <= N, P <= 100 Output Output must contain an ordered list of problems called as "very simple", separated by spaces. If there are no such problems, output must contain a single integer 0 (zero). Sample Input
4 4
1 1 1 2
5 900 21 40
10 10 9 10
3 4 3 5
Sample Output 3
Original: Northeastern Europe 2002, Far-Eastern Subregion 문제 풀기:
줄마다 가장 작은 문제를 찾아서 각각min수조와max수조가 존재한다.다시 min수조에서 n/2회를 초과한 수를 찾아내고 이 수는max수조에 없는 것, 즉 요구하는 수이다.출력은 순서대로 해야 합니다.
#include
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
cocos2d Lua 학습(一)ios에서 루아 함수 호출 및 전참 방법 lua 코드: 출력 결과: lua 호출 C++ 방법: add 함수: lua 코드: 출력 결과: 함수를 호출합니다. 함수를 호출하려면 다음 협의를 따르십시오. 우선, 호출할 함...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.