Submission #1330630

#TimeUsernameProblemLanguageResultExecution timeMemory
1330630tralalero_tralalaAncient Machine 2 (JOI23_ancient2)C++17
Compilation error
0 ms0 KiB
#include "ancient2.h"

// #include <bits/stdc++.h>
// #define _ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

namespace {

// #define fore(i,a,b) for(lli i = (a), abcdxd = (b); i < abcdxd; i++)
// #define f first
// #define s second
// #define pb push_back
// #define ENDL '\n'
// #define sz(s) lli((s).size())
// #define all(v) (v).begin(), (v).end()
// #define rall(v) (v).rbegin(), (v).rend()
// using namespace std;
// typedef int lli;
// typedef pair<lli,lli> ii;
// typedef vector<lli> vi;
// typedef vector<ii> vii;
// typedef long double ld;
// #define deb(x) cout << #x << ": " << x << endl;

}  // namespace

std::string Solve(int N) {
  string s(N, '0');
  // lli m = 1002;
  // vi a(m, 0), b(m, 0);
  // a[m-2] = m-2, a[m-1] = m-1;
  // b[m-2] = m-2, b[m-1] = m-1;
  // fore(i,0,N){
  //   a[i] = m-2;
  //   b[i] = m-1;
  //   if (Query(m, a, b) == (m-1)) s[i] = '1';
  //   a[i] = i+1;
  //   b[i] = i+1;
  // }
  return s;
}

Compilation message (stderr)

ancient2.cpp: In function 'std::string Solve(int)':
ancient2.cpp:27:3: error: 'string' was not declared in this scope
   27 |   string s(N, '0');
      |   ^~~~~~
ancient2.cpp:27:3: note: suggested alternatives:
In file included from /usr/include/c++/13/string:41,
                 from ancient2.h:1,
                 from ancient2.cpp:1:
/usr/include/c++/13/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/13/string:66:11: note:   'std::pmr::string'
   66 |     using string    = basic_string<char>;
      |           ^~~~~~
ancient2.cpp:39:10: error: 's' was not declared in this scope
   39 |   return s;
      |          ^