首页 > 代码库 > 【推导】Codeforces Round #411 (Div. 1) A. Find Amir

【推导】Codeforces Round #411 (Div. 1) A. Find Amir

1 2 3 4 5 6 7

4-5-3-6-2-7-1

答案是(n-1)/2

#include<cstdio>
using namespace std;
int n;
int main(){
	scanf("%d",&n);
	printf("%d\n",(n-1)/2);
	return 0;
}

【推导】Codeforces Round #411 (Div. 1) A. Find Amir