結果
問題 | No.745 letinopia raoha |
ユーザー |
![]() |
提出日時 | 2018-10-19 22:18:07 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 603 bytes |
コンパイル時間 | 2,188 ms |
コンパイル使用メモリ | 198,728 KB |
最終ジャッジ日時 | 2025-01-06 14:40:58 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 |
ソースコード
#include<bits/stdc++.h>using namespace std;using Int = long long;template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}//INSERT ABOVE HEREsigned main(){Int a,b,c,d;cin>>a>>b>>c>>d;if(d==10){cout<<"Impossible"<<endl;return 0;}cout<<"Possible"<<endl;vector<Int> v;for(Int i=0;i<a;i++) v.emplace_back(100);for(Int i=0;i<b;i++) v.emplace_back(50);sort(v.begin(),v.end());Int ans=0;for(Int i=0;i<a+b;i++) ans+=v[i]<<(i/100);cout<<ans<<endl;return 0;}