1 条题解
-
0
我们发现当 时你找不到两个合法的 。当 可以找到 。所以这个 就是答案。
你以为这就满分了吗?注意到可能有多个 是 的倍数。当 是偶数显然恰有两个 ,当 为奇数考虑 ,。发现 时实际有 。特判即可。
下面给出 spj 实现:
int n,s; n=inf.readInt();s=inf.readInt(); int a=n/2,b=n/2,c=n/2*2; if(n==3)b=2,c=3; int A=ouf.readInt(),B=ouf.readInt(),C=ouf.readInt(); if(s<=1){ if(A==0&&B==0&&C==0){ if(s==1)quitp(0.520,"Sadly, you lost the game."); else quitp(0.8,"A draw! You're strong enough to be an administrator, but cyx may not allow it."); } } if(B<1||C<1||B>=C||C>n)quitf(_wa,"Ridiculous game!"); if(A==a&&B==b&&C==c)quitf(_ok,"You have won, and you have perfectly won"); if(A==a)quitp(0.9,"You are close to a perfect win, but still a little bit further! However, who told you to win the game? Do you think he'll really give out his girlfriend?"); if(s>A)quitp(0.520,"Sadly, you lost the game."); if(s==A)quitp(0.8,"A draw! You're strong enough to be an administrator, but cyx may not allow it."); if(s<A)quitp(0.1314,"Who told you to win the game? Do you think he'll really give out his girlfriend?");
信息
- ID
- 984
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 1
- 标签
- (无)
- 递交数
- 39
- 已通过
- 5
- 上传者