Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.03 s | 3 KBi |
#2 |
Correcto
|
0.03 s | 3 KBi |
#3 |
Correcto
|
0.03 s | 3 KBi |
#4 |
Correcto
|
0.034 s | 3 KBi |
#5 |
Correcto
|
0.029 s | 3 KBi |
#6 |
Correcto
|
0.027 s | 3 KBi |
#7 |
Correcto
|
0.037 s | 3 KBi |
#8 |
Correcto
|
0.034 s | 4 KBi |
#9 |
Correcto
|
0.031 s | 3 KBi |
#10 |
Correcto
|
0.027 s | 3 KBi |
using System; public class Program { public static void Main() { var length = Console.ReadLine(); var input = Console.ReadLine(); var numbers = input.Split(' '); var countQueries = Console.ReadLine(); int[] queries = new int[Int32.Parse(countQueries)]; for (var i = 0; i < Int32.Parse(countQueries); i++) { input = Console.ReadLine(); queries[i] = Int32.Parse(input); } for ( int i=0; i<Int32.Parse(countQueries); i++) { int greaterNumber = 0; for ( int j=0; j<Int32.Parse(length); j++) { if( queries[i] < Int32.Parse(numbers[j]) ) { greaterNumber++; } } Console.WriteLine(greaterNumber); } } }