Search found 14 matches

by walking_hell
Wed Jan 22, 2014 11:13 pm
Forum: Volume 103 (10300-10399)
Topic: 10344 - 23 out of 5
Replies: 81
Views: 26920

uva 10344

why wa ??? #include <iostream> #include<queue> #include<stack> #include<vector> #include<cstring> using namespace std; char arr[]={'+','-','*','/'}; double num[7];int taken[7],flag; vector<double> vct; double check(double a,double b,char c) { switch(c) { case '+' :return a+b; case '-' : return a-b; ...
by walking_hell
Fri Dec 27, 2013 1:25 am
Forum: Volume 116 (11600-11699)
Topic: 11624 - Fire!
Replies: 54
Views: 14155

uva 11624

why wa ??? #include<iostream> #include<cstdio> #include<queue> #include<string> #include<fstream> #include<cstring> using namespace std; char field[1010][1010]; int dist; int row,col; bool bfs() { queue <int>J,f; bool res=false; int distf[row+6][col+6],distj[row+6][col+6]; for(int i=0;i<row;i++) { f...
by walking_hell
Thu Dec 19, 2013 2:52 am
Forum: Volume 4 (400-499)
Topic: 469 - Wetlands of Florida
Replies: 63
Views: 20786

uva 469

why RE !!! #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <cctype> #include <stack> #include <queue> #include <list> #include <vector> #include <map> #include <sstream> #include <cmath> #include <bitset> #include <utility> #include <set> #inc...
by walking_hell
Sun Dec 15, 2013 1:45 pm
Forum: Volume 117 (11700-11799)
Topic: 11747 - Heavy Cycle Edges
Replies: 11
Views: 3890

11747 - Heavy Cycle Edges

cant find my bug !!! #include<cstdio> #include<iostream> #include<vector> #include<queue> #include<algorithm> #include<map> #include<stack> using namespace std; struct edge { int u,v; long long w; bool operator < (const edge &p) const { return w < p.w; } }; vector <edge> e; map< string,long long int...
by walking_hell
Fri Nov 29, 2013 5:45 pm
Forum: Volume 114 (11400-11499)
Topic: 11466 - Largest Prime Divisor
Replies: 29
Views: 15347

uva 11466

cant find my bug !!! #include<iostream> #include<vector> #include<cstdio> #include<cmath> #define max 10000500 using namespace std; vector <long long> prime; bool flag[max]; void sieve() { prime.push_back(2); //cout<<"h;;"; for(long long i=4;i<max;i+=2) flag[i]=true; for(long long i=3;i<max;i+=2) { ...
by walking_hell
Sun Nov 24, 2013 12:59 am
Forum: Volume 5 (500-599)
Topic: 532 - Dungeon Master
Replies: 39
Views: 9884

uva 532

thanx for the reply brianfry...i got it accepted...i misunderstood the problem..
by walking_hell
Wed Nov 20, 2013 7:38 pm
Forum: Volume 4 (400-499)
Topic: 459 - Graph Connectivity
Replies: 132
Views: 24113

uva 459

thanxxxxx....got accepted
by walking_hell
Wed Oct 23, 2013 6:56 pm
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 18494

uva 382

why PE ???? #include<stdio.h> int func(int x) { int mid=x/2,count,sum=0; for(count=1;count<=mid;count++) { if(x%count==0) sum=sum+count; } if(sum==x) return 0; else if(sum>x) return 1; else return 2; } int main() { int num,arr[100],nums[100],c=0; while(scanf("%d",&num)==1 && num!=0) { arr[c]=func(nu...
by walking_hell
Tue Oct 22, 2013 10:53 am
Forum: Volume 119 (11900-11999)
Topic: 11945 - Financial Management
Replies: 10
Views: 5159

uva 11945

GETTING WA... CANT FIND MY BUG #include<stdio.h> #include<string.h> int main() { double nums,avg; int count,test,ll,len; char arr[1000]; while(scanf("%d",&test)==1) { for(count=1;count<=test;count++) { avg=0; for(ll=0;ll<12;ll++) { scanf("%lf",&nums); avg=avg+nums; } avg=avg/12.0; sprintf(arr,"%.2lf...
by walking_hell
Sun Oct 20, 2013 10:07 am
Forum: Volume 4 (400-499)
Topic: 492 - Pig-Latin
Replies: 213
Views: 24819

uva 492

cant find my bug #include<stdio.h> #include<string.h> #include<ctype.h> int main() { char arr[1000000],word[1000000]; int len,lenw,count,tm; while(scanf(" %[^\n]",arr)==1) { len=strlen(arr); for(count=0;count<len;count++) { if(tolower(arr[count])>='a' && tolower(arr[count])<='z') { sscanf(&arr[count...
by walking_hell
Fri Oct 04, 2013 1:24 am
Forum: Volume 125 (12500-12599)
Topic: 12543 - Longest Word
Replies: 22
Views: 3288

uva 12543

Need your help for fixing my bug...thank u #include<stdio.h> #include<string.h> #include<ctype.h> int main() { char word[100],save[100]; word[0]='\0'; int lenprev=0,lennew,count; while(strcmp(word,"E-N-D")!=0) { count=0; while(1) { word[count]=getchar(); if(word[count]=='(') { while((word[count]=get...
by walking_hell
Thu Oct 03, 2013 12:22 am
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 9992

uva 445

thanks for the previous solutions...i failed to catch my bug in this problem..so i need your help again.. #include<stdio.h> #include<string.h> int rev(int x) { if(x<10) return x; int mod,sum=0; while(x!=0) { sum=sum+x%10; x=x/10; } return sum; } int main() { int numb,count,len,countund; char arr[100...
by walking_hell
Tue Oct 01, 2013 9:18 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 77416

uva 10038

im getting wa again and again bt could not find my bug.pls help... #include<stdio.h> #include<math.h> int main() { int test,count,arr[3000],diff; while(scanf("%d",&test)==1 && test>0 && test<=3000) { for(count=0;count<test;count++) { scanf("%d",&arr[count]); } for(count=0;count<test-1;count++) { if(...
by walking_hell
Tue Sep 24, 2013 4:48 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 55857

uva 10035

I got WA more than 7 times in this problem and could not find the bug.. my code #include<stdio.h> int main() { long int num1,num2,x,y,carry,crry=0; while(scanf(" %ld %ld",&num1,&num2)==2 && (num1!=0 || num2!=0)) { carry=0; while(num1!=0 || num2!=0) { x=num1%10; y=num2%10; num1=num1/10; num2=num2/10;...

Go to advanced search