Search found 7 matches

by MNT.95
Fri Feb 06, 2015 7:16 pm
Forum: Volume 110 (11000-11099)
Topic: 11060 - Beverages
Replies: 96
Views: 31965

Re: 11060 - Beverages

wrong output for the third sample case :oops: Note: I'm changing the strings with numbers starting from 0 then I'm doing normal dfs. so the case of not being relations between drinks are handled :) #include<map> #include<deque> #include<queue> #include<stack> #include<sstream> #include<iostream> #in...
by MNT.95
Wed Feb 04, 2015 5:05 pm
Forum: Volume 2 (200-299)
Topic: 200 - Rare Order
Replies: 25
Views: 12616

Re: 200 - Rare Order

I don't completely understand the problem :3 but this is my code, please if someone can tell what is wrong My Approach: 1) make an edge from every character in the string to character before it, I made the map "hs" to exchange the characters with numbers ("id" variable) so that would make the graph ...
by MNT.95
Fri Apr 11, 2014 12:02 pm
Forum: Volume 4 (400-499)
Topic: 406 - Prime Cuts
Replies: 187
Views: 21767

Re: 406 - Prime Cuts WA

thanks.. that was helpful :)
by MNT.95
Wed Apr 09, 2014 6:36 pm
Forum: Volume 4 (400-499)
Topic: 406 - Prime Cuts
Replies: 187
Views: 21767

Re: 406 - Prime Cuts WA

why I'm getting wrong answer? #include<iostream> #include<vector> #include<stdio.h> #include<string.h> using namespace std; bool prime[1005]; vector<int>primeNum(170); int sizePrimeNum; void seive() { memset(prime, true ,sizeof prime); prime[0] = 0; for(int i=2; i*i<1005;i++) if(prime[i]) for(int j=...
by MNT.95
Sun Feb 09, 2014 12:45 pm
Forum: Volume 7 (700-799)
Topic: 713 - Adding Reversed Numbers
Replies: 142
Views: 39715

Re: 713 - Adding Reversed Numbers

My code #include<stdio.h> using namespace std; int main() { int t; scanf("%d",&t); while(t--) { long long x,rev_x=0,y,rev_y=0,sum,rev_sum=0; scanf("%d %d",&x,&y); while(x>0) { rev_x *= 10; rev_x += x%10; x=x/10; } while(y>0) { rev_y *= 10; rev_y += y%10; y=y/10; } sum=rev_x+rev_y; while(sum>0) { rev...
by MNT.95
Sun Feb 09, 2014 12:32 pm
Forum: Volume 7 (700-799)
Topic: 713 - Adding Reversed Numbers
Replies: 142
Views: 39715

Re: 713 - Adding Reversed Numbers

My code is AC in SPOJ and POJ, but in UVA it is WA??
Why is that heppens to the same code ??
by MNT.95
Thu Feb 06, 2014 1:45 pm
Forum: Volume 118 (11800-11899)
Topic: 11850 - Alaska
Replies: 32
Views: 9912

Re: 11850-Alaska

I don't get the point of coming back ??
I sort them then I check the difference between them, every test case I run in my program is correct, so why I got WA?

Go to advanced search