Search found 17 matches

by LucasSchm
Tue Dec 17, 2013 4:52 am
Forum: Volume 116 (11600-11699)
Topic: 11608 - No Problem
Replies: 25
Views: 9705

Re: 11608 - No Problem

Here:
printf("Case %d: \n",cs++);

You have an space after the : and before \n.
by LucasSchm
Mon Aug 13, 2012 9:48 pm
Forum: Volume 113 (11300-11399)
Topic: 11331 - The Joys of Farming
Replies: 13
Views: 6586

Re: 11331 - The Joys of Farming

Quite a few test cases: 68 2 2 4 1 2 2 3 3 4 4 1 3 1 2 1 2 3 4 1 2 2 1 2 1 3 2 1 2 1 2 1 3 2 1 3 1 2 2 3 1 3 1 2 3 1 2 2 3 1 3 2 3 4 1 2 2 3 3 4 4 5 1 4 4 1 2 2 3 3 4 4 5 3 5 4 1 2 2 3 3 4 4 5 5 3 4 1 2 2 3 3 4 4 5 2 2 4 1 2 2 3 3 4 1 4 2 4 6 1 2 2 3 3 4 4 1 1 5 3 6 4 1 4 1 2 1 3 1 4 1 5 1 4 4 1 2 1...
by LucasSchm
Sun Oct 02, 2011 6:55 am
Forum: Volume 106 (10600-10699)
Topic: 10685 - Nature
Replies: 41
Views: 17654

Re: 10685 - Nature

i m getting frustrated on this problem,i got 8 WAs in this prob,i have passed all the I/Os on the board,pls help me.Advanced thanks to the helpers. #include<iostream> #include<string> #include<map> using namespace std; int p[10000],rank[10000],n,m,mx; map<string,int>flag; void ini() { int i; for(i=...
by LucasSchm
Sat Oct 01, 2011 11:40 pm
Forum: Volume 118 (11800-11899)
Topic: 11856 - Ferry Loading V
Replies: 2
Views: 2503

Re: 11856 - Ferry Loading V

Spoiler ahead... I got that i have to normalize to solve this problem, but why does that work? Because i could have a large number (as 100.00) and so small numbers (0.0000001) that depending on how i normalize, the small numbers would be 0 and so my DP wouldn't work properly. Does it have to do with...
by LucasSchm
Fri Aug 20, 2010 4:39 am
Forum: Volume 116 (11600-11699)
Topic: 11658 - Best Coalitions
Replies: 7
Views: 3624

Re: 11658 - Best Coalitions

i used DP bt got WA, pls Help... Here is my code, #include<iostream> #include<math.h> #include<string> #include<algorithm> using namespace std; bool v[10005]; int no[200],n; int parse(string str) { int i,j,k,l; j=0; for(i=0;i<str.length()&&str[i]!='.';i++) j=j*10+str[i]-48; j=j*100; if(i<str.length...
by LucasSchm
Fri Aug 13, 2010 12:59 am
Forum: Volume 103 (10300-10399)
Topic: 10337 - Flight Planner
Replies: 20
Views: 8748

Re: 10337 - Flight Planner

i got LOTS OF WAs :S:S:S is there any test cases plz ?!!! Here you go: 16 400 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 9 9 1 1 -9 -9 1 1000 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 7 7 7 7 7 7 7 ...
by LucasSchm
Sun May 09, 2010 12:03 am
Forum: Volume 109 (10900-10999)
Topic: 10989 - Bomb, Divide and Conquer
Replies: 25
Views: 13084

Re:

after readin the posts i come to know the names of some algos... can any one plz give me web addr to know about these algos? [i searched in yahoo but did not find much helpful links.] Karger's algorithm Dinic's maxflow algorithm Stoer and Wagner's algorithm Thanks in advance. Mahbub read Stoer-Wagn...
by LucasSchm
Sat May 01, 2010 9:20 pm
Forum: Volume 103 (10300-10399)
Topic: 10337 - Flight Planner
Replies: 20
Views: 8748

Re: 10337 - Flight Planner

Code: Select all

That little '\n' at the end of every output... ACC now.
by LucasSchm
Fri Oct 30, 2009 12:51 am
Forum: Volume 117 (11700-11799)
Topic: 11714 - Blind Sorting
Replies: 14
Views: 3250

Re: 11714 Blind Sorting

I think acc codes should be removed ASAP. . .
I know about the rule of removing ACC code, but i would like to know why i keep getting WA with my code, even thought it outputs exactly the same. Maybe other people are having the same trouble...
by LucasSchm
Thu Oct 29, 2009 7:45 pm
Forum: Volume 117 (11700-11799)
Topic: 11714 - Blind Sorting
Replies: 14
Views: 3250

Re: 11714 Blind Sorting

So i took this ACC code (thanks, bruno): #include <iostream> #include <math.h> using namespace std; main(void) { unsigned int n; while (cin >> n) { --n; cout << n+(unsigned int)log2(n) << endl; } return 0; } Note that this does what arifsecu suggested. But then i looked at it and couldn't see a sing...
by LucasSchm
Wed Oct 28, 2009 11:36 pm
Forum: Volume 117 (11700-11799)
Topic: 11714 - Blind Sorting
Replies: 14
Views: 3250

Re: 11714 Blind Sorting

Got it :D But why do you check if the number is even and check if PotenciaVef is true? Because if it's odd then for sure it isn't a 2^x. It's just an "optimization" to not call the function PotenciaVef (Power[of 2]Verify). But if you are asking if there is something special about them (numbers of 2...
by LucasSchm
Tue Oct 27, 2009 10:47 pm
Forum: Volume 117 (11700-11799)
Topic: 11714 - Blind Sorting
Replies: 14
Views: 3250

Re: 11714 Blind Sorting

Haha! You posted 5 minutes before me :oops: Sorry for my post :oops: I will delete it! On my post I was asking for tips to do this, because I didnt understand it very well :o About your WA, did you tested with 1? (just trying to guess :roll: ) The problem says, " n will be less than any 10 digit pr...
by LucasSchm
Tue Oct 27, 2009 8:57 pm
Forum: Volume 117 (11700-11799)
Topic: 11714 - Blind Sorting
Replies: 14
Views: 3250

11714 - Blind Sorting

I would like some critical test cases, as i can't see why my solution is wrong (been getting WA). My code: #include <stdio.h> #include <math.h> long long potenciasDois[50]; void CalculaPotencias() { long long i; long long x; x = 1; potenciasDois[0] = 0; for (i=1; i < 40; i++) { potenciasDois[i] = x;...
by LucasSchm
Sat Oct 10, 2009 5:22 pm
Forum: Volume 116 (11600-11699)
Topic: 11608 - No Problem
Replies: 25
Views: 9705

Re: 11608 - No Problem

No is not work... I use that IF statement because the index is become -1 and it is out of range... I change my code but again I got a WA... #include <iostream> #include <algorithm> #include <cmath> using namespace std; int main() { int n , p[13] , m[13] , sum; bool res; while(cin >> n , n) { sum = ...
by LucasSchm
Mon Sep 07, 2009 9:12 am
Forum: Volume 116 (11600-11699)
Topic: 11608 - No Problem
Replies: 25
Views: 9705

Re: 11608 - No Problem

New_AshkankhaN, the problem says, "The first line of every test case has an integer S (0<=S<=100)", and on your code:

Code: Select all

 while(s>0) 
And check what Observer said...

Go to advanced search