Borderou de evaluare (job #2335474)

Utilizator Cozzmy13Tanislav Cosmin Cozzmy13 Data 4 februarie 2019 10:04:18
Problema Subsir crescator maximal Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Compilare: main.cpp: In function 'int a(int, int)': main.cpp:3:171: warning: no return statement in function returning non-void [-Wreturn-type] std::ifstream f("scmax.in");std::ofstream g("scmax.out");const int N=2e5;int v[N],p[N],q[N],i,j,n,Q,x;int a(int I,int Z){while(p[Z]!=I)Z--;if(I>1)a(I-1,Z-1);g<<v[Z]<<" ";}int main(){f>>n;for(i=1;i<=n;i++){f>>v[i];++v[i];j=1;while(x>q[j]&j<=Q)j++;q[j]=x;p[i]=j;Q=Q>j?Q:j;}g<<Q<<"\n";a(Q,n);} ^ main.cpp: In function 'int main()': main.cpp:3:232: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] std::ifstream f("scmax.in");std::ofstream g("scmax.out");const int N=2e5;int v[N],p[N],q[N],i,j,n,Q,x;int a(int I,int Z){while(p[Z]!=I)Z--;if(I>1)a(I-1,Z-1);g<<v[Z]<<" ";}int main(){f>>n;for(i=1;i<=n;i++){f>>v[i];++v[i];j=1;while(x>q[j]&j<=Q)j++;q[j]=x;p[i]=j;Q=Q>j?Q:j;}g<<Q<<"\n";a(Q,n);} ~^~~~~
Test Timp executie Memorie folosita Mesaj Punctaj/test Punctaj/grupa
13ms131kbLungime incorecta!00
23ms131kbLungime incorecta!00
32ms131kbLungime incorecta!00
43ms131kbLungime incorecta!00
53ms131kbLungime incorecta!00
63ms131kbLungime incorecta!00
73ms131kbLungime incorecta!00
835ms917kbLungime incorecta!00
936ms917kbCorect!10
1034ms917kbLungime incorecta!0
Punctaj total0

Ceva nu functioneaza?