6267 | 2023-11-10 20:17:53 | horka | Bevásárlás | cpp17 | Accepted 100/100 | 3ms | 4052 KiB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c; cin>>a>>b>>c;
int sum=0,vett=0;
sum+=min(300*10,300*a);
vett+=min(10,a);
if(vett<10) {sum+=min((10-vett)*350,b*350); vett+=min(10-vett,b);}
if(vett<10) sum+=min((10-vett)*400,c*400);
cout<<(a+b+c>=10?sum:-1)<<endl;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Accepted | 3ms | 2120 KiB | ||||
3 | Accepted | 3ms | 2332 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 3ms | 2540 KiB | ||||
5 | Accepted | 2ms | 2600 KiB | ||||
6 | Accepted | 3ms | 2800 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 3ms | 2888 KiB | ||||
8 | Accepted | 3ms | 3136 KiB | ||||
9 | Accepted | 3ms | 3224 KiB | ||||
10 | Accepted | 3ms | 3440 KiB | ||||
subtask4 | 30/30 | ||||||
11 | Accepted | 2ms | 3564 KiB | ||||
12 | Accepted | 3ms | 3644 KiB | ||||
13 | Accepted | 3ms | 3528 KiB | ||||
14 | Accepted | 3ms | 3520 KiB | ||||
subtask5 | 40/40 | ||||||
15 | Accepted | 3ms | 3920 KiB | ||||
16 | Accepted | 3ms | 3932 KiB | ||||
17 | Accepted | 3ms | 3872 KiB | ||||
18 | Accepted | 2ms | 3984 KiB | ||||
19 | Accepted | 2ms | 3924 KiB | ||||
20 | Accepted | 3ms | 4052 KiB |