fork download
  1. program ideone;
  2. { NOTE: it is recommended to use this even if you don't understand the following code }
  3.  
  4. const
  5. MAXP = 1000000;
  6. MAXN = 100000;
  7.  
  8. var
  9. M, N, P, i, j : LongInt;
  10. K : Array[0..MAXN-1] of LongInt;
  11. S : Array[0..MAXN-1] of Array[0..5] of LongInt;
  12. ans : Array[0..MAXP-1] of Array[0..1] of LongInt;
  13.  
  14. begin
  15. {
  16.   uncomment the two following lines if you want to read/write from files
  17.   assign(input, 'input.txt'); reset(input);
  18.   assign(output, 'output.txt'); rewrite(output);
  19. }
  20.  
  21. ReadLn(N, M);
  22.  
  23. for j := 0 to N - 1 do
  24. begin
  25. Read(K[j]);
  26. for i := 0 to K[j] - 1 do
  27. Read(S[j][i]);
  28. end;
  29.  
  30.  
  31. P := 0;
  32. for i := 0 to 2 - 1 do
  33. for j := 0 to MAXP - 1 do
  34. ans[j][i] := 0;
  35.  
  36. { INSERT YOUR CODE HERE }
  37.  
  38. WriteLn(P);
  39. for j := 0 to P - 1 do
  40. begin
  41. for i := 0 to 2 - 1 do
  42. Write(ans[j][i], ' ');
  43. WriteLn();
  44. end;
  45.  
  46. end.
  47.  
Success #stdin #stdout 0.01s 8872KB
stdin
Standard input is empty
stdout
0