Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#2 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#3 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#4 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#5 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#6 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#7 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#8 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#9 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#10 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#11 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#12 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#13 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#14 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#15 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#16 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#17 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#18 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#19 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
||
#20 |
Error de compilación
main.cpp:7:5: error: use of undeclared identifier 'vector' vector<int> array; ^ main.cpp:7:15: error: expected '(' for function-style cast or type construction vector<int> array; ~~~^ main.cpp:7:17: error: use of undeclared identifier 'array' vector<int> array; ^ main.cpp:9:16: error: use of undeclared identifier 'array' cin >> array[i]; ^ main.cpp:13:20: error: use of undeclared identifier 'array' int temp = array[k]; ^ main.cpp:15:31: error: use of undeclared identifier 'array' while(j>=0 && temp <= array[j]) ^ main.cpp:17:13: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:17:26: error: use of undeclared identifier 'array' array[j+1] = array[j]; ^ main.cpp:20:9: error: use of undeclared identifier 'array' array[j+1] = temp; ^ main.cpp:24:16: error: use of undeclared identifier 'array' cout <<array[i]<<" "; ^ 10 errors generated. |
#include<iostream> using namespace std; int main () { int n; cin >> n; vector<int> array; for(int i=0; i<n;i++){ cin >> array[i]; } for(int k=1; k<10; k++) { int temp = array[k]; int j= k-1; while(j>=0 && temp <= array[j]) { array[j+1] = array[j]; j = j-1; } array[j+1] = temp; } for(int i=0;i<10;i++) { cout <<array[i]<<" "; } }