Search found 64 matches

by arifcsecu
Tue Sep 28, 2010 5:06 pm
Forum: Volume 118 (11800-11899)
Topic: 11847 - Cut the Silver Bar
Replies: 11
Views: 4422

Re: 11847 Cut the Silver Bar

say n is input. So

m=__builtin_clz(n)
a=31-m

Answer is a.

Here n is unsigned long
by arifcsecu
Fri Sep 10, 2010 10:57 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 38141

Re: Runtime Error - 101

your code is too dificult to guess. I used 2d vector . Its very simple to code
by arifcsecu
Mon Sep 06, 2010 9:22 pm
Forum: Volume 117 (11700-11799)
Topic: 11790 - Murcia's Skyline
Replies: 28
Views: 14123

Re: 11790 - Murcia's Skyline

in dp branch , i know much about LIS LCS LDS.
To anis,
in this problem maximum length of the sequence is not necessary. So instead of maximum length, you have to find maximum sum LIS .
In the same loop , you can find LDS also.

If u need any more hints, just reply here.
by arifcsecu
Mon Sep 06, 2010 12:11 pm
Forum: General
Topic: volume thread
Replies: 0
Views: 3242

volume thread

to admin, please create a new thread for volume CXVIII
by arifcsecu
Thu Sep 02, 2010 11:03 pm
Forum: Volume 4 (400-499)
Topic: 438 - The Circumference of the Circle
Replies: 29
Views: 9382

Re: 438 - The Circumference of the Circle

i got 11 times WA using x^2+y^2+gx+fy+c=0 equation method.
At last i got accepted using Sunny methods.

Thanks Sunny Bhi..
by arifcsecu
Wed Sep 01, 2010 12:23 am
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 36123

Re: 10000 - Longest Path

please
increase your array size
for 100 to 101 or more ..

hints: Why did you not use Floyd Warshall Algorithm ? it has an easy solution with simple floyd warshall algorithmm
by arifcsecu
Tue Aug 31, 2010 11:51 pm
Forum: Volume 5 (500-599)
Topic: 507 - Jill Rides Again
Replies: 92
Views: 29913

Re: 507 - Jill rides again

Same problem like 10684 I was failed for a chili mistake like if(n==2) if(d[1]<0) printf "NO route" else printf "root between 1 and 2" but i wrote if(d[1]>0) for above cases.. Critical input: 3 2 -2 2 2 10 1 2 5 3 -13 6 4 3 -2 Output: Route 1 has no nice parts The nicest part of route 2 is between s...
by arifcsecu
Fri Aug 27, 2010 8:57 pm
Forum: Volume 113 (11300-11399)
Topic: 11353 - A Different Kind of Sorting
Replies: 17
Views: 7537

Re: 11353 - A different kind of Sorting

try to use sieve method..
in the flying of sieve method , just calculate the factor of all number
then use qsort() / sort()..
by arifcsecu
Fri Aug 27, 2010 3:45 pm
Forum: Volume 113 (11300-11399)
Topic: 11321 - Sort! Sort!! and Sort!!!
Replies: 50
Views: 20353

Re: 11321 - Sort! Sort!! and Sort!!!

Please Any body help me. I got a couple of Wrong Answer. My code pass all the test found in this thread #include<iostream> #include<cstdio> #include<algorithm> using namespace std; long int m; bool cmp(long int a,long int b) { long int ra,rb,p,q; if(a<0) p=(-1)*a; else p=a; if(b<0) q=(-1)*b; else q=...
by arifcsecu
Mon Aug 23, 2010 8:13 pm
Forum: Off topic (General chit-chat)
Topic: What kinds of problems do you solve most ?
Replies: 25
Views: 75959

Re: What kinds of problems do you solve most ?

* DP (now)
* Adhoc
* String
* Math
* Geometry
* Graph

I am weak in :

* Backtracking ( trying hard)
* Number theroy
by arifcsecu
Fri Aug 13, 2010 11:55 pm
Forum: Volume 106 (10600-10699)
Topic: 10683 - The decadary watch
Replies: 35
Views: 12770

Re: 10683 - The Decadary Watch

not so hard ...Integer Division is sufficient
long int h,m,s,c,tt;

while(gets(ch))
{
h=(ch[0]-'0')*10+(ch[1]-'0');
m=(ch[2]-'0')*10+(ch[3]-'0');
s=(ch[4]-'0')*10+(ch[5]-'0');
c=(ch[6]-'0')*10+(ch[7]-'0');
tt=((h*60+m)*60+s)*100+c;
tt=tt*125/108;

printf("%07ld\n",tt);
}
by arifcsecu
Wed Aug 11, 2010 9:19 pm
Forum: Volume 116 (11600-11699)
Topic: 11646 - Athletics Track
Replies: 2
Views: 2366

Re: 11646 Atheletics Track

i solved it in C++

input :

int main()
{
flaoat a,b;
char ch;

while(scanf("%lf %s %lf",&a,ch,&b)==3)
{

process

output

return 0;
}
by arifcsecu
Fri Apr 02, 2010 6:04 pm
Forum: Volume 116 (11600-11699)
Topic: 11686 - Pick up sticks
Replies: 44
Views: 10471

Re: 11686 How can

Exactly correct.
Back edge can easily be detected using color arrary
by arifcsecu
Sun Feb 28, 2010 12:45 am
Forum: Volume 117 (11700-11799)
Topic: 11752 - The Super Powers
Replies: 6
Views: 3604

Re: Goods2010-02-15-fifty-11




// What is this ..................
It is very important forum for the programmers but not for others ...............
by arifcsecu
Mon Feb 22, 2010 1:16 pm
Forum: Volume 117 (11700-11799)
Topic: 11736 - Debugging RAM
Replies: 5
Views: 2318

Re: debugging ram

Code Removed
After accepted.

Critical Input:
8 1
ab 8
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
4
ab
ab
cd
ef

Output:
ab=18446744073709551615
ab=18446744073709551615
cd=
ef=

Go to advanced search