結果
| 問題 |
No.842 初詣
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-03 03:27:25 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 305 bytes |
| コンパイル時間 | 1,926 ms |
| コンパイル使用メモリ | 194,328 KB |
| 最終ジャッジ日時 | 2025-01-11 14:00:08 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0),ios::sync_with_stdio(false);
vector<int>v(7); for(auto&&i:v)cin>>i;
vector<int>y={500,100,50,10,5,1};
for(int i=0;i<6;++i){
int m=v.back()/y.at(i);
v.back()-=y.at(i)*min(m,v.at(i));
}
cout<<(v.back()==0?"YES"s:"NO"s)<<"\n"s;
}