CodeChef submission 27922 (C) plaintext list. Status: WA, problem C1, contest MAY09. By ajay_vishnu (Ajay Vishnu), 2009-05-11 14:59:16.
#include<stdio.h> #include<math.h> //int x; //for(; scanf("%d",&x) > 0 && x != 42; printf("%d\n", x)); int main() { int given,temp; int w[6]; int n,i; int flag=1; while(given>0) { for(i=0;i<n;i++) { } i=0; while(i<n) { if(w[i]>w[i+1]+1) { temp=w[i]; w[i]=w[i+1]; w[i+1]=temp; i=0; } else i++; } for(i=0;i<n;i++) { } given--; } return 0; }
Comments

