Gabriel_Duarte

Untitled

May 3rd, 2014
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. int main()
  6. {
  7.     int n = 20, c;
  8.     srand (time(NULL));
  9.     FILE * out = fopen("1552.in", "w");
  10.  
  11.     fprintf(out, "%d\n", n);
  12.     while(n--)
  13.     {
  14.         c = rand() % 501;
  15.         fprintf(out, "%d\n", c);
  16.         for(int i = 0; i < c; i++)
  17.             fprintf(out, "%d %d\n", rand() % 10001, rand() % 10001);
  18.        
  19.     }
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment