fork download
  1. #include <bits/stdc++.h>
  2. #include "testlib.h"
  3.  
  4. using namespace std;
  5.  
  6. int w[3010][3010], T[3010];
  7.  
  8. int main(int argc, char **argv) {
  9. registerGen(argc, argv, 1);
  10.  
  11.  
  12. int n = atoi(argv[1]);
  13.  
  14.  
  15. printf("%d\n", n);
  16.  
  17. for (int i = 0; i < n; i++) {
  18. for (int j = i + 1; j < n; j++) {
  19. int ck = 0;
  20. if (i >= n - 3) {
  21. ck = (j - i) % 2;
  22. }
  23. else if(j >= n - 3) {
  24. ck = 0;
  25. }
  26. else {
  27. ck = rnd.next(0, 1);
  28. }
  29. w[i][j] = ck, w[j][i] = 1-ck;
  30. }
  31. }
  32.  
  33. int i;
  34. for (i = 0; i < n; i++)T[i] = i;
  35. //shuffle(T, T + n);
  36. for (int i = 0; i < n; i++) {
  37. for (int j = 0; j < n; j++) {
  38. printf("%c", i == j ? '-' : "LW"[w[T[i]][T[j]]]);
  39. }
  40. puts("");
  41. }
  42. }
  43.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:21: fatal error: testlib.h: No such file or directory
 #include "testlib.h"
                     ^
compilation terminated.
stdout
Standard output is empty