Last active
November 23, 2017 05:21
-
-
Save siberiy4/b09a89538b97bff8c34382c2eaa352fb 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 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