Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#2 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#3 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#4 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#5 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#6 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#7 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#8 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#9 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#10 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#11 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#12 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#13 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#14 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#15 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#16 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#17 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#18 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#19 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#20 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#21 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#22 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#23 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
||
#24 |
Error de compilación
main.cpp:19:30: error: called object type 'int' is not a function or function pointer maximo_local = maximo(a[j],maximo_local+ a[j]); ~~~~~~^ main.cpp:20:24: error: called object type 'int' is not a function or function pointer maximo = maximo(maximo,maximo_local); ~~~~~~^ 2 errors generated. |
#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 maximo = a[0]; int maximo_local = a[0]; for(int j = 1;j<n;j++){ maximo_local = maximo(a[j],maximo_local+ a[j]); maximo = maximo(maximo,maximo_local); } cout << maximo << endl; return 0; } int maximo (int a,int b){ if(a>b){ return a; }else{ return b; } }