Search found 18 matches

by sir. manuel
Tue Dec 21, 2010 11:17 pm
Forum: Volume 100 (10000-10099)
Topic: 10032 - Tug of War
Replies: 91
Views: 32393

Re: 10032 - Tug of War

I used backtracking to this problem, but i get a TLE!!!,,,can i do more fast my code??? #include<stdio.h> #define max 150 int queremos,n,v[max],sum,sum2; void subset(int indice,int llevamos,int p[]) { if(llevamos==queremos){ int suma=0; //Queremos=ElementosDeseado for(int i=0;i<queremos;i++){ //P es...
by sir. manuel
Sat Nov 20, 2010 9:00 pm
Forum: Volume 109 (10900-10999)
Topic: 10930 - A-Sequence
Replies: 102
Views: 32242

Re: 10930 - A-Sequence

I think that my algorithm it´s fine, but i got WA. I can´t find my error!!! Can you help me? #include<stdio.h> int main() { int tam,n=1; while(scanf("%d",&tam)==1){ int aux=tam,vec[tam],indice=0,band=1; while(aux--){ scanf("%d",&vec[indice]); indice++; } if(vec[0]>=1); else band=0; for(int i=1;i<tam...
by sir. manuel
Sat Nov 20, 2010 7:55 pm
Forum: Volume 8 (800-899)
Topic: 836 - Largest Submatrix
Replies: 19
Views: 8901

836.-Largest submatrix

Hi, this is my first post, i can´t write english fine, so you have to be patient... I´m trying to solve the problem 836,,,i use DP,,,the test cases that i input to my solution it´s fine,,,but when i send to the judge i got WA... I don´t can see my error...can you help me??? ACCEPTED I did a stupid e...

Go to advanced search