Skip to content

Instantly share code, notes, and snippets.

@siberiy4
Last active November 23, 2017 05:21
Show Gist options
  • Save siberiy4/b09a89538b97bff8c34382c2eaa352fb to your computer and use it in GitHub Desktop.
Save siberiy4/b09a89538b97bff8c34382c2eaa352fb to your computer and use it in GitHub Desktop.
#include <stdio.h> /*デフォ物*/
int main(void){
int i= 0, count = 1, b , a, w, h, d;
getchar();
getchar();
getchar();
scanf ("%d",&w);
printf("%d ",w);
scanf ("%d",&h);
printf("%d ",h);
scanf ("%d",&d);
printf("%d ",d);
scanf("%d",&a);
b = a;
for(i = 1; i <= (w * h -1) ;i++){
scanf("%d",&a);
if( a != b){
printf("%x %x ",b,count);
b = a;
count = 1;
}
else{
count++;
}
}
printf("%x %x ",b,count);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment