Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll;

#define FOR(i,m,n) for(int i=(m);i<(n);++i)
typedef vector<int> vi;
typedef vector<vi> vvi;
inline int in() { int x; cin >> x; return x; }

void solve() {
  int n = in();
  vvi x(n), y(n);
  vi a(n);
  FOR(i,0,n) {
    a[i] = in();
    x[i].resize(a[i]);
    y[i].resize(a[i]);
    FOR(j,0,a[i]) {
      x[i][j] = in()-1;
      y[i][j] = in();
    }
  }
  int ans = 0;
  FOR(i,1,1<<n) {
    vi honest(n);
    FOR(j,0,n) honest[j] = i>>j & 1;
    int ok = 1;
    FOR(j,0,n) if (honest[j]==1)
      FOR(k,0,a[j]) if (y[j][k]!=honest[x[j][k]]) ok = 0;
    if (ok) maxs(ans, __builtin_popcount(i));
  }
  cout << ans << endl;
}

#undef int
int main() {
  solve();
  return 0;
}


Compiler output:
a.cc:4:13: error: template argument 1 is invalid
    4 | #define int ll;
      |             ^~
a.cc:7:16: note: in expansion of macro 'int'
    7 | typedef vector<int> vi;
      |                ^~~
a.cc:4:13: error: template argument 2 is invalid
    4 | #define int ll;
      |             ^~
a.cc:7:16: note: in expansion of macro 'int'
    7 | typedef vector<int> vi;
      |                ^~~
a.cc:7:1: warning: 'typedef' was ignored in this declaration
    7 | typedef vector<int> vi;
      | ^~~~~~~
a.cc:7:19: error: expected unqualified-id before '>' token
    7 | typedef vector<int> vi;
      |                   ^
a.cc:8:16: error: 'vi' was not declared in this scope
    8 | typedef vector<vi> vvi;
      |                ^~
a.cc:8:18: error: template argument 1 is invalid
    8 | typedef vector<vi> vvi;
      |                  ^
a.cc:8:18: error: template argument 2 is invalid
a.cc:4:13: error: declaration does not declare anything [-fpermissive]
    4 | #define int ll;
      |             ^~
a.cc:9:8: note: in expansion of macro 'int'
    9 | inline int in() { int x; cin >> x; return x; }
      |        ^~~
a.cc:9:12: error: ISO C++ forbids declaration of 'in' with no type [-fpermissive]
    9 | inline int in() { int x; cin >> x; return x; }
      |            ^~
a.cc: In function 'int in()':
a.cc:4:13: error: declaration does not declare anything [-fpermissive]
    4 | #define int ll;
      |             ^~
a.cc:9:19: note: in expansion of macro 'int'
    9 | inline int in() { int x; cin >> x; return x; }
      |                   ^~~
a.cc:9:23: error: 'x' was not declared in this scope
    9 | inline int in() { int x; cin >> x; return x; }
      |                       ^
a.cc: In function 'void solve()':
a.cc:4:13: error: declaration does not declare anything [-fpermissive]
    4 | #define int ll;
      |             ^~
a.cc:12:3: note: in expansion of macro 'int'
   12 |   int n = in();
      |   ^~~
a.cc:12:7: error: 'n' was not declared in this scope; did you mean 'yn'?
   12 |   int n = in();
      |       ^
      |       yn
a.cc:14:3: error: 'vi' was not declared in this scope; did you mean 'vvi'?
   14 |   vi a(n);
      |   ^~
      |   vvi
a.cc:4:13: error: declaration does not declare anything [-fpermissive]
    4 | #define int ll;
      |             ^~
a.cc:6:24: note: in expansion of macro 'int'
    6 | #define FOR(i,m,n) for(int i=(m);i<(n);++i)
      |                        ^~~
a.cc:15:3: note: in expansion of macro 'FOR'
   15 |   FOR(i,0,n) {
      |   ^~~
a.cc:15:7: error: 'i' was not declared in this scope
   15 |   FOR(i,0,n) {
      |       ^
a.cc:6:28: note: in definition of macro 'FOR'
    6 | #define FOR(i,m,n) for(int i=(m);i<(n);++i)
      |                            ^
a.cc:6:39: error: expected ')' before ';' token
    6 | #define FOR(i,m,n) for(int i=(m);i<(n);++i)
      |                       ~               ^
a.cc:15:3: note: in expansion of macro 'FOR'
   15 |   FOR(i,0,n) {
      |   ^~~
a.cc:15:7: error: 'i' was not declared in this scope
   15 |   FOR(i,0,n) {
      |       ^
a.cc:6:42: note: in definition of macro 'FOR'
    6 | #define FOR(i,m,n) for(int i=(m);i<(n);++i)
      |                                          ^
a.cc:4:13: error: declaration does not declare anything [-fpermissive]
    4 | #define int ll;
      |             ^~
a.cc:24:3: note: in expansion of macro 'int'
   24 |   int ans = 0;
      |   ^~~
a.cc:24:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |   int ans = 0;
      |       ^~~
      |       abs
a.cc:4:13: error: declaration does not declare anything [-fpermissive]
    4 | #define int ll;
      |             ^~
a.cc:6:24: note: in expansion of macro 'int'
    6 | #define FOR(i,m,n) for(int i=(m);i<(n);++i)
      |                        ^~~
a.cc:25:3: note: in expansion of macro 'FOR'
   25 |   FOR(i,1,1<<n) {
      |   ^~~
a.cc:6:39: error: expected ')' before ';' token
    6 | #define FOR(i,m,n) for(int i=(m);i<(n);++i)
      |                       ~               ^
a.cc:25:3: note: in expansion of macro 'FOR'
   25 |   FOR(i,1,1<<n) {
      |   ^~~