Advertisement
Guest User

Untitled

a guest
Jan 24th, 2011
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. #define N 511
  5. /* or 512 */
  6.  
  7. char s[N][N + 1];
  8.  
  9. int main() {
  10.     int i, j, k, t;
  11.     for (i = 0; i < N; ++i) {
  12.         for (j = 0; j < N; ++j) {
  13.             s[i][j] = 'a';
  14.         }
  15.     }
  16.     k = 0;
  17.     for (t = 0; t < 200; ++t)
  18.     for (i = 0; i < N; ++i) {
  19.         for (j = 0; j < N; ++j) {
  20.             if (0 == strcmp(s[i], s[j])) {
  21.                 ++k;
  22.             }
  23.         }
  24.     }
  25.     printf("%d\n", k);
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement