[链接] 我是链接,点我呀:) [题意] 让你找到排名的前k名,并列的话,如果分数大于0那么就算晋级 问你最后有多少人可以晋级. [题解] 按照题意模拟就好, 先按照a[max] = a[k]的规则找到下标的最大值max 然后依据a[max]==0的规则,一直减小这个max. 直到max变成0为止. 最后输出max就好了 [代码] import java.util.Scanner; public class Main { public static int N = 50; public stat…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Kevin Sun has just finished competing in Codeforces Round #334! The round was 120 minutes long and featured five problems with maximum point valu…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output As you have noticed, there are lovely girls in Arpa's land. People in Arpa's land are numbered from 1 to n. Everyone has exactly one crush, i-th…
time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Two soldiers are playing a game. At the beginning first of them chooses a positive integer n and gives it to the second soldier. Then the second…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output In this problem we assume the Earth to be a completely round ball and its surface a perfect sphere. The length of the equator and any meridian i…
time limit per test4 seconds memory limit per test256 megabytes inputstandard input outputstandard output Mahmoud wants to write a new dictionary that contains n words and relations between them. There are two types of relations: synonymy (i. e. the…