Search found 3 matches

by yangmie
Wed Jul 30, 2008 7:52 pm
Forum: Volume 4 (400-499)
Topic: 402 - M*A*S*H
Replies: 56
Views: 21549

Re: 402 help~

why i got TLE ?
i try all the test cases i can find and pass it,but still TLE...

thx for your help...


#include<stdio.h>
#include<stdlib.h>

typedef struct node{
int no;
struct node *next;
}NODE;

int main(){
int n,x,y,live,tp,times=1;
int kill[20];
NODE *root;
NODE *newptr;
NODE *tmp ...
by yangmie
Wed Dec 19, 2007 7:49 pm
Forum: Volume 4 (400-499)
Topic: 492 - Pig-Latin
Replies: 213
Views: 49489

#include<stdio.h>
#include<ctype.h>
char input[1000000];
char temp[1000000];
int main()
{
while(gets(input)!=NULL)
{
int i=0;
while(input[i]!='\0')
{
int x=0;
while(isalpha(input[i]))
{
temp[x]=input[i];
x++;
i++;
}
int y;
if(temp[0]=='a'||temp[0]=='e'||temp[0]=='i'||temp[0]=='o ...
by yangmie
Wed Dec 05, 2007 7:19 am
Forum: Volume 103 (10300-10399)
Topic: 10310 - Dog and Gopher
Replies: 47
Views: 23090

#include<stdio.h>
#include<math.h>
int main()
{
int n,k,temp;
double x1,y1,x2,y2;
double holeX[10000],holeY[10000];
double d1,d2;
while(scanf("%d%lf%lf%lf%lf",&n,&x1,&y1,&x2,&y2)==5)
{
temp=0;
for(k=0;k<n;k++)
{
scanf("%lf%lf",&holeX[k],&holeY[k]);
d1=sqrt((holeX[k]-x1)*(holeX[k]-x1 ...

Go to advanced search