Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
main.cpp:24:32: error: expected ';' after expression output[j] = max ^ ; 1 error generated. |
||
#2 |
Error de compilación
main.cpp:24:32: error: expected ';' after expression output[j] = max ^ ; 1 error generated. |
||
#3 |
Error de compilación
main.cpp:24:32: error: expected ';' after expression output[j] = max ^ ; 1 error generated. |
||
#4 |
Error de compilación
main.cpp:24:32: error: expected ';' after expression output[j] = max ^ ; 1 error generated. |
||
#5 |
Error de compilación
main.cpp:24:32: error: expected ';' after expression output[j] = max ^ ; 1 error generated. |
||
#6 |
Error de compilación
main.cpp:24:32: error: expected ';' after expression output[j] = max ^ ; 1 error generated. |
||
#7 |
Error de compilación
main.cpp:24:32: error: expected ';' after expression output[j] = max ^ ; 1 error generated. |
||
#8 |
Error de compilación
main.cpp:24:32: error: expected ';' after expression output[j] = max ^ ; 1 error generated. |
||
#9 |
Error de compilación
main.cpp:24:32: error: expected ';' after expression output[j] = max ^ ; 1 error generated. |
||
#10 |
Error de compilación
main.cpp:24:32: error: expected ';' after expression output[j] = max ^ ; 1 error generated. |
#include <iostream> using namespace std; int main(){ long long c, n, a, last; 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; }