April Fools Contest 2017, problem: (F) Crunching Numbers Just for You Solution in C

#include <stdio.h>
#include<algorithm>
#include<time.h>
using namespace std;
int a[100];
int main()
{
    int n,i;
    clock_t t0;
    t0=clock();
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",a+i);
    }
    for(;(clock()-t0)/CLOCKS_PER_SEC<=1.0;);
    sort(a,a+n);
    for(i=0;i<n;i++)
        printf("%d ",a[i]);
    return 0;
}
(Visited 47 times, 1 visits today)

About the Author:

Leave A Comment