Submission #929982

#TimeUsernameProblemLanguageResultExecution timeMemory
929982sofiefuAncient Machine 2 (JOI23_ancient2)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "ancient2.h" using namespace std; typedef long long ll; #define int long long #define vo vector #define fi first #define se second #define pr(x) cerr << #x << " " << x << endl; #define sz(x) x.size() typedef vo<int> vi; typedef pair<int, int> pii; #define rep(i, a, b) for(ll i = (a); i<(b); i++) ll const inf = LLONG_MAX, mxn = 51; int Query(int m, vi a, vi b){ } std::string Solve(int n){ string ans; rep(i, 0, 1000){ int ret = Query(2, {0, 0}, {1, 1}); if(ret==0){ ans.pb('0'); } else{ ans.pb('1'); } } return ans; }

Compilation message (stderr)

ancient2.cpp: In function 'long long int Query(long long int, vi, vi)':
ancient2.cpp:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^
ancient2.cpp: In function 'std::string Solve(long long int)':
ancient2.cpp:27:17: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pb'
   27 |             ans.pb('0');
      |                 ^~
ancient2.cpp:30:17: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pb'
   30 |             ans.pb('1');
      |                 ^~