#include <cstdio>
#include <cstring>
const int maxn = 1E5 + 10;
int T, n, inp[maxn], kase;
int main(int argc, char const *argv[])
{
scanf("%d", &T);
while (T--)
{
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%d", &inp[i]);
bool first = 0;
for (int i = 1; i < n - 1; i++)
if (inp[i] != inp[i + 1] - 1)
first = 1;
if (first == 0) printf("Case #%d: %d\n", ++kase, 1);
else
{
for (int i = 1; i < n; i++)
if (inp[i] != inp[0] + i)
{
printf("Case #%d: %d\n", ++kase, i + 1);
break;
}
}
}
return 0;
}
水题一个,想清楚在写。