Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.008 s | 2 KBi |
#2 |
Correcto
|
0.009 s | 1 KBi |
#3 |
Correcto
|
0.005 s | 2 KBi |
#4 |
Correcto
|
0.006 s | 12 KBi |
#5 |
Correcto
|
0.005 s | 1 KBi |
#6 |
Error en tiempo de ejecución (NZEC)
Exited with error status 134 malloc(): corrupted top size run: line 1: 3 Aborted (core dumped) ./a.out |
0.006 s | 2 KBi |
#7 |
Correcto
|
0.007 s | 10 KBi |
#8 |
Correcto
|
0.008 s | 2 KBi |
#9 |
Correcto
|
0.006 s | 8 KBi |
#10 |
Correcto
|
0.006 s | 10 KBi |
#include <iostream> #include <vector> using namespace std; int main(){ int n; cin >> n; vector<int> a(n); for(int i=0;i<n;i++){ cin >> a[i]; } int inquires; cin >> inquires; vector<int> b(n); for(int i=0;i<inquires;i++){ cin >> b[i]; } int counter = 0; for(int i=0;i<inquires;i++){ for(int j=0;j<n;j++){ if(b[i]<a[j]){ counter++; } } cout << counter <<endl; counter = 0; } return 0; }