Submission #710370

# Submission time Handle Problem Language Result Execution time Memory
710370 2023-03-15T07:49:46 Z lam Duathlon (APIO18_duathlon) C++14
Compilation error
0 ms 0 KB
)
        for (int j=1; j<=n; j++)
            for (int z=1; z<=n; z++)
                if (i!=j&&j!=z&&i!=z)
                {
//                    if (res[i][j][z]) cout<<i<<' '<<j<<' '<<z<<" !! "<<endl;
                    ans += res[i][j][z];
                }
    cout<<ans<<'\n';
}

Compilation message

count_triplets.cpp:1:1: error: expected unqualified-id before ')' token
    1 | )
      | ^
count_triplets.cpp:2:23: error: 'j' does not name a type
    2 |         for (int j=1; j<=n; j++)
      |                       ^
count_triplets.cpp:2:29: error: 'j' does not name a type
    2 |         for (int j=1; j<=n; j++)
      |                             ^
count_triplets.cpp:3:27: error: 'z' does not name a type
    3 |             for (int z=1; z<=n; z++)
      |                           ^
count_triplets.cpp:3:33: error: 'z' does not name a type
    3 |             for (int z=1; z<=n; z++)
      |                                 ^
count_triplets.cpp:9:5: error: 'cout' does not name a type
    9 |     cout<<ans<<'\n';
      |     ^~~~
count_triplets.cpp:10:1: error: expected declaration before '}' token
   10 | }
      | ^