Last active
November 23, 2017 04:19
-
-
Save siberiy4/5a4d3ff9c19b8fb1c494111d78e15768 to your computer and use it in GitHub Desktop.
This file contains 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
#include<stdio.h> | |
int main(void){ | |
int a,b, count=0, w, h, d,i=0; | |
scanf("%d",&w); | |
scanf("%d",&h); | |
scanf("%d",&d); | |
printf("P2\n"); | |
printf("%d\n",w); | |
printf("%d\n",h); | |
printf("%d\n",d); | |
while(count<w*h){ | |
scanf("%x",&a); | |
scanf("%x",&b); | |
for(i=0;i<b;i++){ | |
printf("%d\n",a); | |
count++; | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment