Skip to content

Instantly share code, notes, and snippets.

@siberiy4
Last active November 23, 2017 04:19
Show Gist options
  • Save siberiy4/5a4d3ff9c19b8fb1c494111d78e15768 to your computer and use it in GitHub Desktop.
Save siberiy4/5a4d3ff9c19b8fb1c494111d78e15768 to your computer and use it in GitHub Desktop.
#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