Search found 18 matches

by tamim1382csedu19
Mon Feb 03, 2014 5:50 pm
Forum: Volume 111 (11100-11199)
Topic: 11163 - Jaguar King
Replies: 17
Views: 10307

Re: 11163 - Jaguar King

How do I store individual state ? For 15-puzzle problem , It can be done by a ull, as each number is less than 15 , so 4 bit *16 = 64 bit. but here it is 40 numbers. So how Do I store the states to prevent cycling in the dfs for IDA* ? And here is my code , I am getting TLE , http://ideone.com/gVTBM...
by tamim1382csedu19
Tue Oct 29, 2013 10:10 am
Forum: Volume 106 (10600-10699)
Topic: 10616 - Divisible Group Sums
Replies: 39
Views: 18945

Re: 10616 - Divisible Group Sums

thank u brianfry. AC
by tamim1382csedu19
Tue Oct 29, 2013 10:09 am
Forum: Volume 120 (12000-12099)
Topic: 12047 - Highest Paid Toll
Replies: 8
Views: 2177

12047 - Highest Paid Toll

I am getting tle . My algo is, first I calculated all the shortest paths from source. Then, while calculating from target, if (dist[s] +w+dist[target][v] < =p ) than I updated the value of toll. Why TLE? here's my code #include <iostream> #include <bits/stdc++.h> #define inf 1000000 using namespace ...
by tamim1382csedu19
Fri Oct 25, 2013 3:37 pm
Forum: Volume 121 (12100-12199)
Topic: 12160 - Unlock the Lock
Replies: 4
Views: 1236

12160 - Unlock the Lock

Getting WA for the problem. It should be a simple bfs problem. Here's my code #include <iostream> #include <queue> #include <string.h> #include <stdio.h> using namespace std; int visited[10005]; int main() { int lock,unlck,r,kase = 1; while(cin>>lock>>unlck>>r && (lock||unlck||r)) { int A[r]; for(in...
by tamim1382csedu19
Mon Sep 23, 2013 6:51 pm
Forum: Volume 106 (10600-10699)
Topic: 10616 - Divisible Group Sums
Replies: 39
Views: 18945

Re: 10616 - Divisible Group Sums

My code matches all the sample I/O in the forum. Why I am still getting WA? #include <iostream> #include <string.h> #include <stdlib.h> using namespace std; long long int mod(long long int a,long long int b) { long long int x = (a%b); return abs(x); } long long int m,q,d,A[205],cnt,n,dp[205][15][25]...
by tamim1382csedu19
Tue Sep 10, 2013 5:12 pm
Forum: Volume 115 (11500-11599)
Topic: 11571 - Simple Equations - Extreme!!
Replies: 31
Views: 11114

Re: 11571 - Simple Equations - Extreme!!

How did you changed my code?
by tamim1382csedu19
Tue Sep 10, 2013 12:08 am
Forum: Volume 115 (11500-11599)
Topic: 11571 - Simple Equations - Extreme!!
Replies: 31
Views: 11114

Re: 11571 - Simple Equations - Extreme!!

Did exactly what u said.. still WA.. #include <iostream> #include <math.h> #include <stdio.h> #include <stdlib.h> using namespace std; typedef long double lli; int main() { int t; cin>>t; while(t--) { lli A,B,C; cin>>A>>B>>C; long double Cp = (A*A-C)/2.0,a = -A,b=Cp,c=-B; long double Q = (a*a - 3*b)...
by tamim1382csedu19
Fri Aug 30, 2013 5:49 pm
Forum: Volume 12 (1200-1299)
Topic: 1262 - Password
Replies: 18
Views: 2079

Re: 1262 password-why i got wrong answer

Getting WA.. can anyone give some critical I/O ?
Here's my code http://ideone.com/ctHs0p
by tamim1382csedu19
Thu Aug 29, 2013 7:54 pm
Forum: Volume 12 (1200-1299)
Topic: 1262 - Password
Replies: 18
Views: 2079

Re: 1262 password-why i got wrong answer

I see the pictures with the problem are broken.. I cant understand them problem without the pics.. Can anyone upload the pics please?
by tamim1382csedu19
Fri Aug 23, 2013 5:59 pm
Forum: Volume 115 (11500-11599)
Topic: 11571 - Simple Equations - Extreme!!
Replies: 31
Views: 11114

Re: 11571 - Simple Equations - Extreme!!

solved all the puzzles... still WA.. #include <iostream> #include <math.h> #include <stdio.h> #include <stdlib.h> #define pi 3.14159265359 using namespace std; typedef long double lli; int main() { int t; cin>>t; while(t--) { lli A,B,C; cin>>A>>B>>C; long double Cp = (A*A-C)/2.0,a = -A,b=Cp,c=-B; lo...
by tamim1382csedu19
Sat Aug 17, 2013 10:51 am
Forum: Volume 115 (11500-11599)
Topic: 11571 - Simple Equations - Extreme!!
Replies: 31
Views: 11114

Re: 11571 - Simple Equations - Extreme!!

still WA , here's my code. Can you provide some more I/O? #include <iostream> #include <math.h> #include <stdio.h> #define pi 3.14159265359 using namespace std; typedef long long int lli; long double round(long double value ) { long long int x; if(value>0) x = value*10.0 + 0.5; else x = value*10.0 -...
by tamim1382csedu19
Fri Aug 16, 2013 1:21 pm
Forum: Volume 115 (11500-11599)
Topic: 11571 - Simple Equations - Extreme!!
Replies: 31
Views: 11114

Re: 11571 - Simple Equations - Extreme!!

Why its still WA? I passed all the sample IO in the forum. Here's my code in ideone http://ideone.com/vcKT1s here's my code #include <iostream> #include <math.h> #include <stdio.h> #define pi 3.14159265359 using namespace std; int main() { int t; cin>>t; while(t--) { long double A,B,C; cin>>A>>B>>C;...
by tamim1382csedu19
Thu Aug 15, 2013 10:51 am
Forum: Volume 114 (11400-11499)
Topic: 11402 - Ahoy, Pirates!
Replies: 45
Views: 15542

Re: 11402 - Ahoy, Pirates

But, I am getting TLE,, How I avoid that?
by tamim1382csedu19
Tue Aug 06, 2013 7:48 pm
Forum: Volume 114 (11400-11499)
Topic: 11402 - Ahoy, Pirates!
Replies: 45
Views: 15542

Re: 11402 - Ahoy, Pirates

SomeOne please help.. I am Trying all day long but couldn't find a way to do >.... getting TLE after using segment tree with lazy updates too.. :( http://ideone.com/WDK1eu

Go to advanced search