Submission #632308

#TimeUsernameProblemLanguageResultExecution timeMemory
632308ggohLanguages (IOI10_languages)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#include "grader.h"
using namespace std;
int V[56][65536];
void excerpt(int *E)
{
  int l=0,maxi=-1;
  
  for(int j=0;j<56;j++)
  {
    int kind=0;
    int v[65536]={};
    for(int i=0;i<100;i++)
    {
      if(V[j][E[i]] && v[E[i]]=0)
      {
        kind++;
        v[E[i]]=1;
      }
    }
    if(kind>maxi)
    {
      maxi=kind;
      l=j;
    }
  }
  
  /*
  vector<int>N;
  for(int j=0;j<56;j++)
  {
    int kind=0;
    for(int i=0;i<100;i++)
    {
      if(V[j][E[i]])
      {
        kind++;
      }
    }
    if(kind==maxi)
    {
      N.push_back(j);
    }
  }
  srand(time(NULL));
  int r=rand();
  r%=(int)(N.size());
  l=N[r];*/
  
  int L=language(l);
  for(int i=0;i<100;i++)
  {
    V[L][E[i]]++;
  }
}

Compilation message (stderr)

lang.cpp: In function 'void excerpt(int*)':
lang.cpp:15:21: error: lvalue required as left operand of assignment
   15 |       if(V[j][E[i]] && v[E[i]]=0)
      |          ~~~~~~~~~~~^~~~~~~~~~