Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

给我看看错误,谢谢了,第1922题用c写的

Posted by SDRJ102010010666 at 2012-03-03 23:08:12
#include<stdio.h>
#include<stdlib.h>
#include<math.h>

int a=1,i =0,j =0,k=0;
int arr1[100];
int arr2[100];
int min[100];

void Paixu(int *p,int a);
int Shuru();

void Paixu(int *p,int a)
{
    for(j = 0;j<a;j++)
    {
		min[k] = p[0];
        if(min[k]>p[j])
			min[k] = p[j];
     }
	k++;
	Shuru();
    
}
int Shuru()
{
	scanf("%d",&a);
	if(a == 0)
		return 0;
    for(i = 0;i<a;i++)
    {
        scanf("%d %d",&arr1[i],&arr2[i]);
		if(arr2[i]>0)
			arr1[i] = ceil((4.5/arr1[i])*3600)+arr2[i];
		else
		{
			continue;
			i--;
		}
    }
    Paixu(arr1,a);
}

int main()
{   
	Shuru();
	for(i =0;i<k;i++)
		printf("%d\n",min[i]);
	system("pause");
    return 0;
}


Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator