Search found 85 matches

by medv
Thu Jan 06, 2005 5:56 pm
Forum: Volume 107 (10700-10799)
Topic: 10781 - Global Positioning System
Replies: 3
Views: 2051

10781 - Global Positioning System

How to solve this problem?
Can smb give me some hints or articles to read?
by medv
Mon Nov 29, 2004 10:51 pm
Forum: Volume 107 (10700-10799)
Topic: 10778 - Mathemagicland
Replies: 28
Views: 11966

10778 - My improved program - but WA

I improved my program - but WA. I need some tests. #include <stdio.h> #include <math.h> #include <stdlib.h> long int n,k,i,j,w; long int p[105]; long int q1[2002],q2[2002]; long int q1len, q2len, rt; long int root[102],temp; double t; double gorner(long int degree,long int n, long int *c,double valu...
by medv
Mon Nov 29, 2004 12:25 pm
Forum: Volume 107 (10700-10799)
Topic: 10778 - Mathemagicland
Replies: 28
Views: 11966

WA soon

To bugzpodder:
I send you PM - I need your help.
I found some mistakes, but soon WA.

I need some tests where my program is wrong.
by medv
Sun Nov 28, 2004 8:32 pm
Forum: Volume 107 (10700-10799)
Topic: 10778 - Mathemagicland
Replies: 28
Views: 11966

10778 - Why WA?

Why WA? I read carefully the text of the problem: 1. first line contains two integers n and k. 2. All inputs/outputs will fit into a standard 32-bit signed integer. 3. extract the rational numbers in order of magnitude from the n-tuple So the roots are rational and can be searched via full search. I...
by medv
Thu Nov 25, 2004 10:16 pm
Forum: Volume 107 (10700-10799)
Topic: 10776 - Determine The Combination
Replies: 19
Views: 10016

Accepted

Thank to Adrian. I don't know why I did sso silly mistake.

To w k: problem statement says that for each input test you have
no more than 100 solutions.
by medv
Wed Nov 24, 2004 11:07 pm
Forum: Volume 107 (10700-10799)
Topic: 10776 - Determine The Combination
Replies: 19
Views: 10016

10776 - Determine The Combination

#include <stdio.h> #include <string.h> #include <memory.h> #include <stdlib.h> int len,r; char s[1001]; char p[1001]; int compare(const void *a, const void *b) { return *(char *)a - *(char *)b; } void print(void) { int i; for(i=0;i<len;i++) printf("%c",p[i]); printf("\n"); } void doit(int pos,int de...
by medv
Sun Nov 14, 2004 8:06 pm
Forum: Volume 107 (10700-10799)
Topic: 10768 - Planarity
Replies: 19
Views: 4633

All OK!

Thank you!

I submitted through email and it cut lines of program
by medv
Sun Nov 14, 2004 11:29 am
Forum: Volume 107 (10700-10799)
Topic: 10768 - Planarity
Replies: 19
Views: 4633

Compile Error soon

It does not help

I even deleted #include <memory.h>
I rewrote

for(i=0;i<=n;i++)
for(j=i;j<=n;j++)
a[i][j] = a[j][i] = 0;
for(i=0;i<=n;i++)
degree[i] = 0;

WHY Compile Error???
I spent a night on it!!!
by medv
Sun Nov 14, 2004 1:10 am
Forum: Volume 107 (10700-10799)
Topic: 10768 - Planarity
Replies: 19
Views: 4633

10768 - Why Compile Error???

#include <stdio.h> #include <memory.h> double a[21][21]; int degree[21]; int c[7]; int m,n; int main(void) { int i,j,x,y; int temp; while(scanf("%d %d\n",&n,&m) == 2) { memset(a,0,sizeof(a)); memset(degree,0,sizeof(degree)); for(j=1;j<=m;j++) { scanf("%d %d\n",&x,&y); if(!a[x][y]) { degree[x]++; deg...
by medv
Mon Oct 11, 2004 10:28 pm
Forum: Volume 103 (10300-10399)
Topic: 10340 - All in All
Replies: 129
Views: 31755

10340 - WA. Help me!

I read a lot about 10340, written in this forum I use char of 1000000, I use long. My program is clear. But I can't find a mistake Help me, please! I do not want to use two char arrays of size 1000000, I use only one. So I use getchar(). I use scanf("\n") to pass eoln symbol. It works right. Help! W...
by medv
Fri Sep 24, 2004 12:15 am
Forum: Volume 107 (10700-10799)
Topic: 10713 - Map
Replies: 16
Views: 5828

Thank!!!!

At last AC! Thank you.
by medv
Thu Sep 23, 2004 11:44 pm
Forum: Volume 107 (10700-10799)
Topic: 10713 - Map
Replies: 16
Views: 5828

Thank you - but WA again

Thank you, but WA again #include <stdio.h> #include <math.h> const double EPS=0.00000000001; void print(double DeltaX,double DeltaY) { if (DeltaY > EPS) printf("north"); if (DeltaY < -EPS) printf("south"); if (DeltaX > EPS) printf("east"); if (DeltaX < -EPS) printf("west"); printf(" %.10lf\n",hypot(...
by medv
Thu Sep 23, 2004 10:50 pm
Forum: Volume 107 (10700-10799)
Topic: 10713 - Map
Replies: 16
Views: 5828

10713 - Map

I can't understand yet. >Where do you ensure that you stay on the island? The problem statement says: The landing place, on the circumference, is specified by its coordinates. And then: ... to the spot marked X without leaving the island. So my landing place is ON the island. And my moves (vertical,...
by medv
Thu Sep 23, 2004 9:23 pm
Forum: Volume 107 (10700-10799)
Topic: 10713 - Map
Replies: 16
Views: 5828

do not understand my mistake

if abs(dx) == abs(dy) I use

if (dx == 0.0 || dy == 0.0 || fabs(fabs(dx) - fabs(dy)) < EPS)
{
print(dx,dy);
continue;
}
and print answer.

Circle is a "convex" figure, so I do not need to check that I
stay on an island.

Give me tests where my program does not work.
by medv
Thu Sep 23, 2004 7:08 pm
Forum: Volume 107 (10700-10799)
Topic: 10713 - Map
Replies: 16
Views: 5828

10713 - WA. Why?

Help me, please! Why WA? #include <stdio.h> #include <math.h> const double EPS=0.00000000001; void print(double DeltaX,double DeltaY) { if (DeltaY > EPS) printf("north"); if (DeltaY < -EPS) printf("south"); if (DeltaX > EPS) printf("east"); if (DeltaX < -EPS) printf("west"); printf(" %.10lf\n",hypot...

Go to advanced search