ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#212133 | #3815. 种树 | Alex9876 | 10 | 0ms | 1200kb | C++ | 455b | 2024-10-13 11:28:54 | 2024-10-13 12:56:15 |
answer
#include<bits/stdc++.h>
int C(int a,int b)
{
double res=1;
for(int c=a;c>a-b;c-=1){res=1.0*res*c;}
for(int v=1;v<b+1;v+=1){res=1.0*res/v;}
return int(res);
}
int main()
{
int a,b,c,t=0;
std::cin>>a>>b>>c;
if(c>ceil(1.0*a*b/2))
{
std::cout<<0;
return 0;
}
if(c==1)
{
std::cout<<a*b;
return 0;
}
t=C(ceil(a*b/2.0),c);
if(a*b%2==0){t*=2;}
else{t+=C(a*b/2,c);}
std::cout<<t;
return 0;
}
详细
小提示:点击横条可展开更详细的信息
Test #1:
score: 10
Accepted
time: 0ms
memory: 1196kb
input:
2 2 1
output:
4
result:
ok 1 number(s): "4"
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 1200kb
input:
2 3 2
output:
6
result:
wrong answer 1st numbers differ - expected: '8', found: '6'
Test #3:
score: 0
Wrong Answer
time: 0ms
memory: 1200kb
input:
4 4 2
output:
56
result:
wrong answer 1st numbers differ - expected: '96', found: '56'
Test #4:
score: 0
Wrong Answer
time: 0ms
memory: 1196kb
input:
4 4 5
output:
112
result:
wrong answer 1st numbers differ - expected: '304', found: '112'
Test #5:
score: 0
Wrong Answer
time: 0ms
memory: 1200kb
input:
3 4 3
output:
40
result:
wrong answer 1st numbers differ - expected: '84', found: '40'
Test #6:
score: 0
Wrong Answer
time: 0ms
memory: 1196kb
input:
3 5 2
output:
49
result:
wrong answer 1st numbers differ - expected: '83', found: '49'
Test #7:
score: 0
Wrong Answer
time: 0ms
memory: 1200kb
input:
3 5 3
output:
91
result:
wrong answer 1st numbers differ - expected: '215', found: '91'
Test #8:
score: 0
Wrong Answer
time: 0ms
memory: 1196kb
input:
3 5 4
output:
105
result:
wrong answer 1st numbers differ - expected: '276', found: '105'
Test #9:
score: 0
Wrong Answer
time: 0ms
memory: 1196kb
input:
3 5 5
output:
77
result:
wrong answer 1st numbers differ - expected: '174', found: '77'
Test #10:
score: 0
Wrong Answer
time: 0ms
memory: 1200kb
input:
4 3 5
output:
12
result:
wrong answer 1st numbers differ - expected: '18', found: '12'