#!/bin/bash

worktime=`cat stderr | grep real | cut -c6-`
timelimited=0
if [ `echo $worktime \> 1.0 | bc -l` = "1" ]; then
	timelimited=1
fi

if [ -f stdout ]; then
	if diff stdout bus.judge 1> /dev/null 2> /dev/null ; then
		if [ $timelimited -eq 1 ]; then
			echo "2"
		else
			echo "0"
		fi
	else
		if [ $timelimited -eq 1 ]; then
			echo "3"
		else
			echo "1"
		fi
	fi
else
	echo "3"
fi
