fork(1) download
  1. #include <stdio.h>
  2.  
  3. #define BUF_SIZE 1024
  4.  
  5. int main()
  6. {
  7. size_t i, s, cc[256] = { };
  8. unsigned char buf[BUF_SIZE];
  9. do
  10. {
  11. s = fread(buf, 1, BUF_SIZE, stdin);
  12. for(i = 0; i < s; ++i)
  13. cc[buf[i]]++;
  14. }
  15. while(s == BUF_SIZE);
  16. for(i = 0; i < 256; ++i)
  17. if(cc[i])
  18. printf("%d %d\n", i, cc[i]);
  19. return 0;
  20. }
Success #stdin #stdout 0s 1792KB
stdin
753377 2007-03-31 18:03:10 Przecięcie w Zbiorze Odcinków	internal error 0.00 0k C++
753059 2007-03-31 15:51:07 Przecięcie w Zbiorze Odcinków	wrong answer 0.25 5.6M C++
stdout
9 2
10 2
32 20
43 4
45 4
46 3
48 15
49 6
50 3
51 8
53 7
54 1
55 7
56 1
57 1
58 4
67 2
77 1
79 2
80 2
90 2
97 2
98 2
99 6
100 2
101 9
103 1
105 9
107 3
108 1
110 6
111 4
114 10
115 1
116 1
119 6
122 4
153 2
179 2
195 2
196 2