I'm getting WA in this problem. I'm sending my findMin() & findMax() code blocks. I hope until now that those two blocks are producing correct results. So help me in this matter.
int findMin()
{
int i;
int min = L;
int mid = L/2; /*This is the mid of pole*/
/**mid theke shobcheye kaser ant ...
Search found 10 matches
- Sun Jul 09, 2006 9:04 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10714 - Ants
- Replies: 20
- Views: 16648
- Sun Mar 19, 2006 9:43 pm
- Forum: Volume 4 (400-499)
- Topic: 485 - Pascal's Triangle of Death
- Replies: 50
- Views: 12853
- Wed Mar 15, 2006 5:17 pm
- Forum: Volume 4 (400-499)
- Topic: 485 - Pascal's Triangle of Death
- Replies: 50
- Views: 12853
485 [Pascal's Triangle of death], I'm getting WA
Hello, in 485 i am getting WA. Can you get my fault? I am providing last two lines of the output....
This is the last but one line....
1 203 20503 1373701 68685050 2733664990 90210944670 2538793728570 62200446349965 1347676337582575 26144920949101955 458724522106970665 7339592353711530640 ...
This is the last but one line....
1 203 20503 1373701 68685050 2733664990 90210944670 2538793728570 62200446349965 1347676337582575 26144920949101955 458724522106970665 7339592353711530640 ...
- Sun Feb 26, 2006 10:12 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10976 - Fractions Again?!
- Replies: 11
- Views: 10032
10976 - Fractions Again?!
This is my code -
#include<stdio.h>
int k,x,y,i;
void list()
{
for(y=k+1; y<=200000 ; y++)
{
if( k*y %(y-k))continue;
x= k*y / (y-k);
if(x<y)break;
if(k*y%(x+y)==0 && ((x*y /(x+y))==k))
printf("1/%d = 1/%d + 1/%d\n",k,x,y);
}
}
int main()
{
//freopen("10976.in","r",stdin ...
#include<stdio.h>
int k,x,y,i;
void list()
{
for(y=k+1; y<=200000 ; y++)
{
if( k*y %(y-k))continue;
x= k*y / (y-k);
if(x<y)break;
if(k*y%(x+y)==0 && ((x*y /(x+y))==k))
printf("1/%d = 1/%d + 1/%d\n",k,x,y);
}
}
int main()
{
//freopen("10976.in","r",stdin ...
- Thu Sep 29, 2005 11:09 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10895 - Matrix Transpose
- Replies: 17
- Views: 8749
10895: Please give me some critical input.
Please provide me with some critical input. I am getting wrong answer for many days.
- Tue Jul 12, 2005 8:35 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10875 - Big Math
- Replies: 27
- Views: 9341
10875: What was meant by RUNTIME ERROR (SIGFPE)?
Hi,
I don't understand what was meant by that Floating Point Exception generated during submission my code of 10875 (Big Math).
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
char input[10][1000];
char inputP[100][5][3];
int operands[100];
char opt[100];
int t;
int ooo[256];
char abc ...
I don't understand what was meant by that Floating Point Exception generated during submission my code of 10875 (Big Math).
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
char input[10][1000];
char inputP[100][5][3];
int operands[100];
char opt[100];
int t;
int ooo[256];
char abc ...
- Sun Apr 24, 2005 7:53 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10530 - Guessing Game
- Replies: 57
- Views: 36879
Problem with 10530 is solved
Thank you very much sidky.
I only changed the "right on" clause.
........
else if(strcmp(msg,"right on")==0)
{
if(testTrue() && a[N])
{
printf("Stan may be honest\n");
}
else
{
printf("Stan is dishonest\n");
}
makeTrue();
}
............
Ashis[/i]
I only changed the "right on" clause.
........
else if(strcmp(msg,"right on")==0)
{
if(testTrue() && a[N])
{
printf("Stan may be honest\n");
}
else
{
printf("Stan is dishonest\n");
}
makeTrue();
}
............
Ashis[/i]
- Sat Apr 23, 2005 9:08 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10530 - Guessing Game
- Replies: 57
- Views: 36879
10530
I don't understand why judge is giving Wrong answer?
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int a[20];
void makeTrue()
{
for(int i=1; i<=10; i++)
a[i]=1;
}
int testTrue()
{
for(int i=1; i<=10; i++)
{
if(a[i]==1)return 1;
}
return 0;
}
int main()
{
//freopen("10530 ...
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int a[20];
void makeTrue()
{
for(int i=1; i<=10; i++)
a[i]=1;
}
int testTrue()
{
for(int i=1; i<=10; i++)
{
if(a[i]==1)return 1;
}
return 0;
}
int main()
{
//freopen("10530 ...
- Mon Mar 28, 2005 8:16 pm
- Forum: Volume 7 (700-799)
- Topic: 706 - LCD Display
- Replies: 221
- Views: 65065
Thanks Raiyan Kamal, that was now accepted.
Yes, i changed my code to handle leading zero printing. and got accepted (PE) result from the judge. I'll correct the PE later. But any way thanks.
- Mon Mar 28, 2005 6:11 pm
- Forum: Volume 7 (700-799)
- Topic: 706 - LCD Display
- Replies: 221
- Views: 65065
706
Could you please help me with my code? The judge answered "WRONG ANSWER". I don't understand why.
Is there any special input present, what my code didn't consider?
I didn't consider NEGATIVE numbers
I didn't consider SIZE = 0
I didn't consider LEADING ZEROs.
This is my code
//Wrong answer ...
Is there any special input present, what my code didn't consider?
I didn't consider NEGATIVE numbers
I didn't consider SIZE = 0
I didn't consider LEADING ZEROs.
This is my code
//Wrong answer ...