#include <assert.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h> // exit()
/*
typedef void (*sighandler_t)(int);
sighandler_t signal(int signum, sighandler_t handler);
int fseek(FILE *stream, long offset, int whence);
*/
long a[256];
void finish(int _) {
int i;
for (i=0; i<256; i++) {
printf("%d: %ld\t", i, a[i]);
if ((i&15) == 15) putchar('\n');
}
putchar('\n');
exit(0);
}
int main() {
signal(1, finish);
signal(2, finish);
while (1) {
int c = getchar();
if (c<0) break;
c &= 255;
assert(c>=0);
assert(c<=255);
a[c]++;
fseek(stdin, 4095, SEEK_CUR);
}
finish(0);
return 0;
}
(unless otherwise marked) Copyright 2002-2014 YakPeople. All rights reserved.