Submission #821913

# Submission time Handle Problem Language Result Execution time Memory
821913 2023-08-11T21:25:58 Z beaconmc Ancient Machine 2 (JOI23_ancient2) C++17
Compilation error
0 ms 0 KB
#include "ancient2.h"


#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>

typedef long long ll;
using namespace std;
//using namespace __gnu_pbds;

#define FOR(i, x, y) for(ll i=x; i<y; i++)
#define FORNEG(i, x, y) for(ll i=x; i>y; i--)
//#define ordered_set tree<ll, null_type,less_equal<ll>, rb_tree_tag,tree_order_statistics_node_update>
#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL)


std::string Solve(int N) {
  vector<int> a(1002), b(1002);
  a[1000] = 1000;
  b[1000] = 1000;
  a[1001] = 1001;
  b[1001] = 1001;

  string sus = "";

  FOR(i,0,1000){
    FOR(j,0,1000){
      if (j==i) a[j] = 1000, b[j] = 1001;
      else a[j] =j+1, b[j] = j+1;
    }
    ll ans = Query(1002, a, b);
    if (ans==1000) sus = sus + "0";
    else sus = sus + "1";
  }
  return sus



}

Compilation message

ancient2.cpp: In function 'std::string Solve(int)':
ancient2.cpp:36:13: error: expected ';' before '}' token
   36 |   return sus
      |             ^
      |             ;
......
   40 | }
      | ~