結果
| 問題 |
No.149 碁石の移動
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-11 18:33:37 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 372 bytes |
| コンパイル時間 | 1,033 ms |
| コンパイル使用メモリ | 94,444 KB |
| 最終ジャッジ日時 | 2025-01-11 01:17:07 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <deque>
using namespace std;
typedef long long int ll;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int a,b,c,d,e,f; cin >> a >> b >> c >> d >> e >> f;
d+=min(e,b);
e-=b;
if(e>0){
c+=e;
a-=e;
}
a+=min(f,c);
cout << a << endl;
}