5845 | 2023-10-03 21:58:31 | mmated | Bevásárlás | cpp11 | Accepted 100/100 | 3ms | 4472 KiB |
#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;
void solve()
{
const int a=300, b=350, c=400;
int x,y,z;
cin>>x>>y>>z;
if(x+y+z <10)
{
cout<<-1;
return;
}
int q=min(10,x);
int s=q*a+min((10-q),y)*b +(10- q- min(10-q,y))*c;
cout<<s;
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int t=1;
//cin>>t;
while(t--) solve();
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1892 KiB | ||||
2 | Accepted | 3ms | 2084 KiB | ||||
3 | Accepted | 3ms | 2324 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 3ms | 2508 KiB | ||||
5 | Accepted | 2ms | 2736 KiB | ||||
6 | Accepted | 3ms | 2944 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 3ms | 3148 KiB | ||||
8 | Accepted | 2ms | 3236 KiB | ||||
9 | Accepted | 3ms | 3368 KiB | ||||
10 | Accepted | 3ms | 3600 KiB | ||||
subtask4 | 30/30 | ||||||
11 | Accepted | 2ms | 3684 KiB | ||||
12 | Accepted | 2ms | 3672 KiB | ||||
13 | Accepted | 3ms | 3800 KiB | ||||
14 | Accepted | 3ms | 3888 KiB | ||||
subtask5 | 40/40 | ||||||
15 | Accepted | 2ms | 3972 KiB | ||||
16 | Accepted | 2ms | 3968 KiB | ||||
17 | Accepted | 3ms | 4224 KiB | ||||
18 | Accepted | 3ms | 4332 KiB | ||||
19 | Accepted | 2ms | 4376 KiB | ||||
20 | Accepted | 2ms | 4472 KiB |