Search found 14 matches

by rossi kamal
Sun Nov 25, 2007 9:14 pm
Forum: Volume 109 (10900-10999)
Topic: 10902 - Pick-up Sticks
Replies: 24
Views: 17887

Test case needed....
by rossi kamal
Tue Oct 09, 2007 8:22 am
Forum: Volume 1 (100-199)
Topic: 137 - Polygons
Replies: 44
Views: 11353

I am getting problem in finding the intersection of two polygons

can any one tell which algorithm should be choosen here...

would u please give some test cases of finding the intersection of two polygons?
by rossi kamal
Thu Oct 04, 2007 2:30 pm
Forum: Volume 103 (10300-10399)
Topic: 10359 - Tiling
Replies: 12
Views: 7092

mf


i got ac with DP..
With recursion i m stuck at bigger inputs
I have used the big integer libraray...


May you tell some more recurrence of 2*1
2*2 0r 2*3 dominoes in 2*n or 3*n 0r n*n
rectangle

wish to learn about them...


Thanks in advance



Rossi
by rossi kamal
Thu Sep 20, 2007 12:44 pm
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 67711

i dont understand why i am getting wrong answer



#include<stdio.h>

//10013

int main()
{




//freopen("in10013.txt","r",stdin);

int i,n;
scanf("%d",&n);


for(i=1;i<=n;i++)
{


long num[100][2],sum[100];
long ad=0;
long j,m;
int f=1;

scanf("%ld",&m);

for(j=1;j<=m;j ...
by rossi kamal
Thu Sep 20, 2007 10:41 am
Forum: Volume 111 (11100-11199)
Topic: 11151 - Longest Palindrome
Replies: 65
Views: 43058

can anyone help i am getting TLE ...


//11151.cpp

//largest palindrome
#include<stdio.h>
#include<string.h>

int largest(int xx,int yy);
int max(int zz,int kk);


char a[1005];

int main()
{


//freopen("inpalindrome.txt","r",stdin);
int n;

scanf("%d\n",&n);
// getchar();
int ii;
for ...
by rossi kamal
Thu Sep 20, 2007 9:26 am
Forum: Volume 111 (11100-11199)
Topic: 11151 - Longest Palindrome
Replies: 65
Views: 43058

Here, we consider also the empty string as a palindrome.

The length of palindrome is 0 in that case..am i right?
by rossi kamal
Wed Sep 19, 2007 9:14 pm
Forum: Volume 111 (11100-11199)
Topic: 11110 - Equidivisions
Replies: 33
Views: 24188

i am getting tle
here is my code

another problem is that can I consider 2*n+1 inputs in a line or more than one blank in a line?


//11110
#include<stdio.h>
int main()
{

// freopen("in11110.txt","r",stdin);
int n;


while(scanf("%d",&n) && n!=0 )
{

int a[210][210];
int mark[105][105 ...
by rossi kamal
Wed Sep 19, 2007 12:57 pm
Forum: Volume 111 (11100-11199)
Topic: 11152 - Colourful Flowers
Replies: 45
Views: 28293

i got AC
even though i did not check
sqrt(s(s-a) (s-b) (s-c))yields valid result or not

but it should be as follows
if s-a<0
s-a =(s-a)*(-1);


so My AC output for:
input:
1 2 1000
ouput:
-1.#IND -1.#IND -1.#IND


its strange that i got AC
becuase if i have s<1000 and a=1000 , will have ...
by rossi kamal
Thu Sep 13, 2007 3:55 pm
Forum: Volume 4 (400-499)
Topic: 460 - Overlapping Rectangles
Replies: 25
Views: 5780

460 WA ..can anyone help me on it?

//Rossi Kamal


#include<stdio.h>

int max(int xx,int yy);
int min(int aa,int bb);

int main()
{

//freopen("in460.txt","r",stdin);

int n;
while(scanf("%d",&n)!=EOF)
{
int i;
for(i=0;i<n;i++)
{
int l1,l2,d1,d2,r1,r2,u1,u2;
scanf("%d %d %d %d",&l1,&d1,&r1,&u1);
scanf("%d %d %d %d",&l2,&d2 ...
by rossi kamal
Wed Sep 12, 2007 8:02 pm
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 21928

445 wa and AC

sorry i ve found that silly mistake.....but i want to mention that

my ac code gives the following result
make it clear plz..

input:
1T1b5T!1T2b1T1b2T!1T1b1T2b2T!1T3b1T1b1T!3T3b1T!1T3b1T1b1T!5T1*1T!

11X21b1X!
4X1b1X!


outout:
T TTTTT
T T TT
T T TT
T T T
TTT T
T T T
TTTTT*T


XX X

XXXX X
by rossi kamal
Sun Sep 09, 2007 8:15 pm
Forum: Volume 112 (11200-11299)
Topic: 11260 - Odd Root Sum
Replies: 22
Views: 14079

11260 - Odd Root Sum

//PROBLEM ID 11260


I m getting TLE..... can i improve to do better?

#include<stdio.h>
#include<math.h>
int main()
{


//freopen("in11260.txt","r",stdin);
long n;
while(scanf("%ld",&n)&&n!=0)
{

double sum=0;
long int i;

if(n%2==0)
n-=1;

for(i=1;i<=n;i+=2)
{
long a;
a=(long ...
by rossi kamal
Thu Sep 06, 2007 9:10 pm
Forum: Volume 110 (11000-11099)
Topic: 11064 - Number Theory
Replies: 25
Views: 21785

11064

is it that we are to find cototients?
by rossi kamal
Mon Sep 03, 2007 10:17 am
Forum: Volume 112 (11200-11299)
Topic: 11244 - Counting Stars
Replies: 21
Views: 14036

/*
Rossi Kamal
acm id 26373
prb id 11244
simple grid

*/


#include<stdio.h>
int check(int x,int y);
char a[205][205];
int v[205][205];
int helper[8][2]={-1,-1,-1,0,-1,+1,1,+1,+1,+1,+1,0,+1,-1,0,-1 };

int main()
{

//freopen("in11244.txt","r",stdin);
int res,i,j,row,column;


while ...
by rossi kamal
Mon Sep 03, 2007 10:16 am
Forum: Volume 112 (11200-11299)
Topic: 11244 - Counting Stars
Replies: 21
Views: 14036

11244 wa

i am getting wrong answer...
i have removed each steps result with an array v[][].-that will not allow the future result changed

still cannot understand why i am getting wrong answer ..

Go to advanced search