I found some mistakes in last code,
and I modified it yet.
I follow the page
http://online-judge.uva.es/board/viewtopic.php?t=3730&highlight=191
and try many examples,
every examples I tried is correct.
But when I update the code to web,
I still get "Wrong answer".
Do someone know where's the ...
Search found 5 matches
- Sat Feb 23, 2008 2:36 am
- Forum: Volume 1 (100-199)
- Topic: 191 - Intersection
- Replies: 103
- Views: 33472
- Fri Feb 22, 2008 5:19 pm
- Forum: Volume 3 (300-399)
- Topic: 374 - Big Mod
- Replies: 79
- Views: 24537
- Fri Feb 22, 2008 5:01 pm
- Forum: Volume 3 (300-399)
- Topic: 374 - Big Mod
- Replies: 79
- Views: 24537
- Fri Feb 22, 2008 2:12 pm
- Forum: Volume 3 (300-399)
- Topic: 374 - Big Mod
- Replies: 79
- Views: 24537
374, Time limit exceeded
Hi, all.
I tried the problem 374,
but I got the "Time limit exceeded".
How can I improve my code?
Also, if I create a array with size 46340,
it become "Runtime error".
#include <stdio.h>
int main()
{
long long int basis=0, p_num=0, m_num=0;
long long int tmp=1;
int i=0, n=0;
while(scanf ...
I tried the problem 374,
but I got the "Time limit exceeded".
How can I improve my code?
Also, if I create a array with size 46340,
it become "Runtime error".
#include <stdio.h>
int main()
{
long long int basis=0, p_num=0, m_num=0;
long long int tmp=1;
int i=0, n=0;
while(scanf ...
- Thu Feb 21, 2008 5:29 am
- Forum: Volume 1 (100-199)
- Topic: 191 - Intersection
- Replies: 103
- Views: 33472
191, WA
I had tried many samples,
but I still can not find where the wrong is.
Can someone tell me?
Thanks
this is my code:
#include <stdio.h>
int poly_a, poly_b, poly_c;
int x_is_cross(int y, int x1, int x2)
{
float tmp=0;
tmp = (float) (poly_c-poly_b*y)/poly_a;
if(tmp >= x1 && tmp <= x2)
return 1 ...
but I still can not find where the wrong is.
Can someone tell me?
Thanks
this is my code:
#include <stdio.h>
int poly_a, poly_b, poly_c;
int x_is_cross(int y, int x1, int x2)
{
float tmp=0;
tmp = (float) (poly_c-poly_b*y)/poly_a;
if(tmp >= x1 && tmp <= x2)
return 1 ...