Created
October 7, 2013 23:20
-
-
Save ylogx/6876706 to your computer and use it in GitHub Desktop.
psmapa.c - Aspiration 2020 Contest Problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* foobar - Shubham Chaudhary | |
* Nitul Datt | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
int fastread() | |
{ | |
unsigned int input; | |
char c=0; | |
while (c<33){ | |
c=getchar_unlocked(); | |
//printf("\nWHILE: c is %c",c); | |
} | |
input=0; | |
while (c>33) | |
{ | |
//printf("\nWHILE 2 : c is %c",c); | |
input=input*10+c-'0'; | |
//printf("\n%d * 10 + %d - %d",input,c,'0'); | |
c=getchar_unlocked(); | |
} | |
//printf("\nInput is : %d",input); | |
return input; | |
} | |
int main(){ | |
//foobar | |
int m; | |
int i; | |
m=fastread();//scanf("%d",&m); | |
for(i=0;i<m;i++){ | |
int no; | |
no=fastread();//scanf("%d",&no); | |
if(no%2==0){ | |
printf("%d won\n",i+1); | |
}else{ | |
printf("%d lost\n",i+1); | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment