# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1035989 | vjudge1 | Two Transportations (JOI19_transportations) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "Azer.h"
#include <bits/stdc++.h>
using namespace std;
int casef=0,NN_;
vector<int>Ua,Va,Ca;
void InitA(int N, int A, std::vector<int> U, std::vector<int> V,
std::vector<int> C) {
NN_=N;
if(!A)SendA(0);
else SendA(1);
casef=!!A;
Ua=U;
Va=V;
Ca=C;
}
vector<int>bits;
void ReceiveA(bool x) {
bits.push_back(x);
}
std::vector<int> Answer() {
if(casef) {
vector<vector<pair<int,int>>>adj(NN_);
int C=bits.size();
for(int i=0;i<C/31;i++){
int U=0,V=0,D=0;
for(int j=0;j<11;j++)
U=U*2+bits[i*31+j];
for(int j=11;j<22;j++)
V=V*2+bits[i*31+j];
for(int j=22;j<31;j++)