http://acm.hdu.edu.cn/showproblem.php?pid=1273

乱搞题,n-1减去起点,把剩下的点分成尽可能相等的两部分1、2(为了得到尽可能大的答案),对于1内部来讲,显然总能保证“新鲜”,在新鲜1后,不难看出2的每个点都对应着一个“新鲜”

说的乱七八糟,大概就这样吧。。。

View Code
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
using namespace std;
int main()
{
    int n;
    while(scanf("%d",&n),n)
        printf("%d\n",(n-1)>>1);
    return 0;
}

 

相关文章:

  • 2022-12-23
  • 2022-01-11
  • 2022-03-03
  • 2022-12-23
  • 2021-09-14
  • 2022-02-22
  • 2021-12-09
  • 2021-07-08
猜你喜欢
  • 2021-06-13
  • 2022-12-23
  • 2021-11-09
  • 2021-06-24
  • 2021-05-23
  • 2022-02-07
相关资源
相似解决方案