//No.146 試験監督(1) import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.lang.Math.*; public class No146 { static final InputStream in = System.in; static final PrintWriter out = new PrintWriter(System.out,false); static final int MOD = 1000000007; static void solve(){ int n = nextInt(); int ans = 0; for (int k=0; k