#!/bin/bash

cp ../bits_ak_n2.cpp .
g++ bits_ak_n2.cpp -O2 -Wall -o ak

cp ../bits_vd.java .
javac bits_vd.java

i=1
while true
do
    python gen.py > bits.in
    ./ak
    mv bits.out{,~}
    java bits_vd
    diff bits.out{,~} || break
    let i=i+1
    echo $i
done

echo BOTVA
