https://i0.wp.com/eblogarithm.com/wp-content/uploads/2017/04/April-Fools-Contest-2017-problem-F-Crunching-Numbers-Just-for-You-Solution-in-C1.png?fit=640%2C360

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 33 times, 1 visits today)



There are no comments

Add yours

Leave a Reply

%d bloggers like this: