Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
main.cpp:44:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(response, 0, sizeof(response)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:44:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(response, 0, sizeof(response)); ^~~~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(values, 0, sizeof(values)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(values, 0, sizeof(values)); ^~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ 4 errors generated. |
||
#2 |
Error de compilación
main.cpp:44:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(response, 0, sizeof(response)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:44:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(response, 0, sizeof(response)); ^~~~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(values, 0, sizeof(values)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(values, 0, sizeof(values)); ^~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ 4 errors generated. |
||
#3 |
Error de compilación
main.cpp:44:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(response, 0, sizeof(response)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:44:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(response, 0, sizeof(response)); ^~~~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(values, 0, sizeof(values)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(values, 0, sizeof(values)); ^~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ 4 errors generated. |
||
#4 |
Error de compilación
main.cpp:44:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(response, 0, sizeof(response)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:44:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(response, 0, sizeof(response)); ^~~~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(values, 0, sizeof(values)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(values, 0, sizeof(values)); ^~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ 4 errors generated. |
||
#5 |
Error de compilación
main.cpp:44:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(response, 0, sizeof(response)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:44:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(response, 0, sizeof(response)); ^~~~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(values, 0, sizeof(values)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(values, 0, sizeof(values)); ^~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ 4 errors generated. |
||
#6 |
Error de compilación
main.cpp:44:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(response, 0, sizeof(response)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:44:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(response, 0, sizeof(response)); ^~~~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(values, 0, sizeof(values)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(values, 0, sizeof(values)); ^~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ 4 errors generated. |
||
#7 |
Error de compilación
main.cpp:44:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(response, 0, sizeof(response)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:44:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(response, 0, sizeof(response)); ^~~~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(values, 0, sizeof(values)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(values, 0, sizeof(values)); ^~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ 4 errors generated. |
||
#8 |
Error de compilación
main.cpp:44:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(response, 0, sizeof(response)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:44:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(response, 0, sizeof(response)); ^~~~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(values, 0, sizeof(values)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(values, 0, sizeof(values)); ^~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ 4 errors generated. |
||
#9 |
Error de compilación
main.cpp:44:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(response, 0, sizeof(response)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:44:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(response, 0, sizeof(response)); ^~~~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(values, 0, sizeof(values)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(values, 0, sizeof(values)); ^~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ 4 errors generated. |
||
#10 |
Error de compilación
main.cpp:44:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(response, 0, sizeof(response)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:44:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(response, 0, sizeof(response)); ^~~~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'? memset(values, 0, sizeof(values)); ^~~~~~ wmemset /usr/include/wchar.h:271:17: note: 'wmemset' declared here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ main.cpp:45:12: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'int [n]' memset(values, 0, sizeof(values)); ^~~~~~ /usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; ^ 4 errors generated. |
#include <iostream> using namespace std; int main() { int c; cin >> c; for (int k = 1; k <= c; k++) { int n; cin >> n; int values[n]; for (int i = 0; i < n; i++) { cin >> values[i]; } int current = 0; int response[n]; for (int i = n - 1; i >= 0; i--) { if (values[i] >= current) { response[i] = -1; current = values[i]; } else { response[i] = current; } } cout << "Case #" << k << ": "; for (int i = 0; i < n - 1; i++) { cout << response[i] << " "; } cout << response[n - 1] << endl; memset(response, 0, sizeof(response)); memset(values, 0, sizeof(values)); } return 0; }