Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.005 s | 2 KBi |
#2 |
Incorrecto
|
0.005 s | 1 KBi |
#3 |
Incorrecto
|
0.005 s | 1 KBi |
#4 |
Incorrecto
|
0.006 s | 1 KBi |
#5 |
Incorrecto
|
0.006 s | 1 KBi |
#6 |
Incorrecto
|
0.126 s | 6 KBi |
#7 |
Incorrecto
|
0.106 s | 29 KBi |
#8 |
Incorrecto
|
0.218 s | 6 KBi |
#9 |
Incorrecto
|
0.117 s | 7 KBi |
#10 |
Incorrecto
|
0.185 s | 7 KBi |
#include <iostream> using namespace std; int main(){ long long c, n; cin >> c; for(int i=0; i<c;i++){ cin >> n; int input[n]; int output[n]; for(int j=0; j<n; j++){ cin >> input[j]; } int max=0; for(int j=n-1; j>=0; j--){ if(input[j]>=max){ output[j] = -1; max = input[j]; }else{ output[j] = max; } } cout << "Case #" << i << ": "; for(int j=0; j<n; j++){ cout << output[j] << " "; } cout << "\n"; } return 0; }