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

By | 2017-04-10T00:32:49+00:00 April 10th, 2017|Categories: C/C++, Programming|Tags: , , |

#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; }