Submission #1021644

# Submission time Handle Problem Language Result Execution time Memory
1021644 2024-07-13T01:07:21 Z 12345678 Chameleon's Love (JOI20_chameleon) C++17
Compilation error
0 ms 0 KB
#include "chameleon.h"
#include <bits/stdc++.h>

using namespace std;

const int nx=1e3+5;

int vs[nx], v[nx][nx];
vector<int> d[nx];

void Solve(int N) {
    for (int i=2; i<=2*N; i++)
    {
        for (int j=1; j<i; j++) vs[j]=0;
        for (int j=1; j<i; j++)
        {
            if (!vs[])
        }
    }
    for (int i=1; i<=2*N; i++)
    {
        if (vs[i]) continue;
        if (d[i].size()==1)
        {
            Answer(i, d[i][0]);
            vs[i]=vs[d[i][0]]=1;
            continue;
        }
        for (int j=0; j<3; j++)
        {
            vector<int> qrs;
            qrs.push_back(i);
            for (int k=0; k<3; k++) if (k!=j) qrs.push_back(d[i][k]);
            if (Query(qrs)==1)
            {
                v[i][d[i][j]]=v[d[i][j]][i]=1;
                break;
            }
        }
    }
    for (int i=1; i<=2*N; i++)
    {
        if (vs[i]) continue;
        for (int j=0; j<3; j++) if (!v[i][d[i][j]]) vs[i]=vs[d[i][j]]=1, Answer(i, d[i][j]);
    }
}

Compilation message

chameleon.cpp: In function 'void Solve(int)':
chameleon.cpp:17:21: error: expected primary-expression before ']' token
   17 |             if (!vs[])
      |                     ^
chameleon.cpp:18:9: error: expected primary-expression before '}' token
   18 |         }
      |         ^