Submission #1249212

#TimeUsernameProblemLanguageResultExecution timeMemory
1249212LIAChameleon's Love (JOI20_chameleon)C++17
Compilation error
0 ms0 KiB
#include "chameleon.h"
#include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
#define ll int
#define vll vector<ll>
namespace {

int variable_example = 1;

} // namespace

void Solve(int n) {
  vll p(2);
  vll found(2 * n, false);
  for (ll i = 0; i < 2 * n; ++i) {
    for (ll j = 0 ; j < 2 * n; ++j) {
     // cout << i + 1 << " " << j + 1 << "  " << Query(p) << endl;
        if (found[i] || (i==j) || found[j])
        continue;
      p[0] = i + 1, p[1] = j + 1;
      if (Query(p) == 1) {
  //      cout<<i+1<<" "<<j+1<<"  "<<Query(p)<<endl;
        found[i] = found[j] = 1;
        Answer(i + 1, j + 1);
      }
    }
  }
}

Compilation message (stderr)

/usr/bin/ld: /tmp/ccIh9zX3.o: in function `Answer(int, int)':
grader.cpp:(.text+0x30): multiple definition of `Answer(int, int)'; /tmp/ccCBIloS.o:chameleon.cpp:(.text+0x30): first defined here
/usr/bin/ld: /tmp/ccIh9zX3.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccCBIloS.o:chameleon.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccIh9zX3.o: in function `Query(std::vector<int, std::allocator<int> > const&)':
grader.cpp:(.text+0xb0): multiple definition of `Query(std::vector<int, std::allocator<int> > const&)'; /tmp/ccCBIloS.o:chameleon.cpp:(.text+0xb0): first defined here
collect2: error: ld returned 1 exit status