fork(1) download
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <cstring>
  4. using namespace std;
  5. int bit[1<<14];
  6. int main(int argc, const char * argv[]) {
  7. int n, m;
  8. int tc;
  9. cin>>tc;
  10. while (scanf("%d%d", &n, &m)!=EOF) {
  11. int w;
  12. memset(bit, 0, sizeof(bit));
  13.  
  14. for (int i=0; i<n; i++) {
  15. int k;
  16. scanf("%d", &k);
  17. w = 0;
  18. for (int j=0; j<k; j++) {
  19. int a;
  20. scanf("%d", &a);
  21. w += 1<<(a-1);
  22. }
  23. bit[w] = 1;
  24. for (int j=0; j<1<<14; j++) {
  25. if (bit[j])
  26. bit[j|w] = 1;
  27. }
  28. }
  29. int ans = 0;
  30. for (int i=0; i<1<<14; i++)
  31. if (bit[i])
  32. ans++;
  33. printf("%d\n", ans);
  34. }
  35. return 0;
  36. }# your code goes here
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "/usr/lib/python3.7/py_compile.py", line 143, in compile
    _optimize=optimize)
  File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "./prog.py", line 4
    using namespace std;
                  ^
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.7/py_compile.py", line 147, in compile
    raise py_exc
py_compile.PyCompileError:   File "./prog.py", line 4
    using namespace std;
                  ^
SyntaxError: invalid syntax

stdout
Standard output is empty