Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.001 s | 0 KBi |
#2 |
Correcto
|
0.007 s | 2 KBi |
#3 |
Correcto
|
0.002 s | 0 KBi |
#4 |
Correcto
|
0.002 s | 0 KBi |
#5 |
Correcto
|
0.002 s | 0 KBi |
#6 |
Correcto
|
0.002 s | 0 KBi |
#7 |
Correcto
|
0.002 s | 0 KBi |
#8 |
Correcto
|
0.01 s | 2 KBi |
#9 |
Correcto
|
0.002 s | 0 KBi |
#10 |
Correcto
|
0.007 s | 2 KBi |
#include <bits/stdc++.h> #include <math.h> using namespace std; int main() { int n; cin>>n; int a[n]; for(int i = 0; i < n; ++i) { cin>>a[i]; } int c; cin>>c; int x[c]; vector<int> results(c, 0); for(int i = 0; i < c; i++) { cin>>x[i]; } for(int i = 0; i < n; i++) { for(int j = 0; j < c; j++) { if(a[i] > x[j]) results[j]++; } } for(int i = 0; i < c; i++) { cout<<results[i]<<endl; } return 0; }