QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#466544 | #3098. Ancient Machine | BalintR | Compile Error | / | / | C++20 | 3.5kb | 2024-07-07 22:00:11 | 2024-07-07 22:00:12 |
Judging History
Anna
#include <bits/stdc++.h>
#include "Anna.h"
#include "Bruno.h"
using namespace std;
typedef unsigned uint;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef complex<double> cpx;
template <typename T> using minPq = priority_queue<T, vector<T>, greater<T>>;
#define ms(a, x) memset(a, x, sizeof(a))
#define pb push_back
#define fs first
#define sn second
#define ALL(v) begin(v), end(v)
#define SZ(v) ((int) (v).size())
#define lbv(v, x) (lower_bound(ALL(v), x) - (v).begin())
#define ubv(v, x) (upper_bound(ALL(v), x) - (v).begin())
template <typename T> inline void UNIQUE(vector<T> &v){sort(ALL(v)); v.resize(unique(ALL(v)) - v.begin());}
const int INF = 0x3f3f3f3f;
const ll LLINF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1);
#define FR(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define FORR(i, a, b) for(int i = (a); i >= (b); i--)
#define dbg(x) {cerr << #x << ' ' << x << endl;}
#define dbgArr(arr, n) {cerr << #arr; FR(_i, n) cerr << ' ' << (arr)[_i]; cerr << endl;}
template <typename T, typename U>
ostream& operator<<(ostream &os, pair<T, U> p){return os << "(" << p.fs << ", " << p.sn << ")";}
void Anna(int n, vector<char> str){
bool foundX = false;
FR(i, n){
if(foundX) Send(str[i] == 'Z');
else Send(foundX = str[i] == 'X');
}
}
void Bruno(int n, int l, vector<int> arr){
vector<bool> rem(n);
vi ps;
FR(i, l) if(arr[i]) ps.pb(i);
FOR(i, 1, SZ(ps)){
FORR(j, ps[i]-1, ps[i-1]+1) Remove(j), rem[j] = true;
Remove(ps[i]), rem[ps[i]] = true;
}
FR(i, n) if(!rem[i]) Remove(i), rem[i] = true;
}
Bruno
#include <bits/stdc++.h>
#include "Anna.h"
#include "Bruno.h"
using namespace std;
typedef unsigned uint;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef complex<double> cpx;
template <typename T> using minPq = priority_queue<T, vector<T>, greater<T>>;
#define ms(a, x) memset(a, x, sizeof(a))
#define pb push_back
#define fs first
#define sn second
#define ALL(v) begin(v), end(v)
#define SZ(v) ((int) (v).size())
#define lbv(v, x) (lower_bound(ALL(v), x) - (v).begin())
#define ubv(v, x) (upper_bound(ALL(v), x) - (v).begin())
template <typename T> inline void UNIQUE(vector<T> &v){sort(ALL(v)); v.resize(unique(ALL(v)) - v.begin());}
const int INF = 0x3f3f3f3f;
const ll LLINF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1);
#define FR(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define FORR(i, a, b) for(int i = (a); i >= (b); i--)
#define dbg(x) {cerr << #x << ' ' << x << endl;}
#define dbgArr(arr, n) {cerr << #arr; FR(_i, n) cerr << ' ' << (arr)[_i]; cerr << endl;}
template <typename T, typename U>
ostream& operator<<(ostream &os, pair<T, U> p){return os << "(" << p.fs << ", " << p.sn << ")";}
void Anna(int n, vector<char> str){
bool foundX = false;
FR(i, n){
if(foundX) Send(str[i] == 'Z');
else Send(foundX = str[i] == 'X');
}
}
void Bruno(int n, int l, vector<int> arr){
vector<bool> rem(n);
vi ps;
FR(i, l) if(arr[i]) ps.pb(i);
FOR(i, 1, SZ(ps)){
FORR(j, ps[i]-1, ps[i-1]+1) Remove(j), rem[j] = true;
Remove(ps[i]), rem[ps[i]] = true;
}
FR(i, n) if(!rem[i]) Remove(i), rem[i] = true;
}
Details
/usr/bin/ld: /tmp/ccYUh06j.o: in function `Anna(int, std::vector<char, std::allocator<char> >)': Bruno.code:(.text+0x39): undefined reference to `Send(int)' /usr/bin/ld: Bruno.code:(.text+0x63): undefined reference to `Send(int)' collect2: error: ld returned 1 exit status