Submission #2459836
Source Code Expand
#include<cstdio> #include<cstring> #include<cmath> #include<cstdlib> #include<ctime> #include<algorithm> #include<queue> #include<vector> #include<map> #define ll long long #define max(a,b) (a>b?a:b) #define min(a,b) (a<b?a:b) #define lowbit(x) (x& -x) #define inf 0x3f3f3f3f #define mod 1000000007 #define eps 1e-18 inline ll read(){ll tmp=0; char c=getchar(),f=1; for(;c<'0'||'9'<c;c=getchar())if(c=='-')f=-1; for(;'0'<=c&&c<='9';c=getchar())tmp=tmp*10+c-'0'; return tmp*f;} inline ll power(ll a,ll b){ll tmp=1; for(;b;b>>=1){if(b&1)tmp=tmp*a%mod; a=a*a%mod;} return tmp;} using namespace std; int main() { ll a=read(),b=read(),c=read(),k=read(); if(a>b&&a>c)printf("%lld\n",(1<<k)*a+b+c); else if(b>c)printf("%lld\n",a+(1<<k)*b+c); else printf("%lld\n",a+b+(1<<k)*c); return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Maximum Sum |
User | quzhizhou |
Language | C++14 (GCC 5.4.1) |
Score | 200 |
Code Size | 813 Byte |
Status | AC |
Exec Time | 0 ms |
Memory | 128 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | in01.txt, in02.txt, in03.txt, in04.txt, sample_01.txt, sample_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in01.txt | AC | 0 ms | 128 KB |
in02.txt | AC | 0 ms | 128 KB |
in03.txt | AC | 0 ms | 128 KB |
in04.txt | AC | 0 ms | 128 KB |
sample_01.txt | AC | 0 ms | 128 KB |
sample_02.txt | AC | 0 ms | 128 KB |