結果
| 問題 |
No.149 碁石の移動
|
| コンテスト | |
| ユーザー |
treeone
|
| 提出日時 | 2016-03-02 22:55:53 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 650 bytes |
| コンパイル時間 | 750 ms |
| コンパイル使用メモリ | 72,964 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 03:15:09 |
| 合計ジャッジ時間 | 1,136 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <map>
#include <set>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <stack>
#include <queue>
#include <utility>
#define rep(i,l,n) for(lint i=l;i<n;i++)
#define rer(i,l,n) for(lint i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
using namespace std;
typedef long long lint;
typedef vector<int> vi;
typedef vector<lint> vli;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
int main(){
int aw,ab,bw,bb,c,d;
cin>>aw>>ab>>bw>>bb>>c>>d;
int ans=0;
ans=aw-max(c-ab,0)+min(d,bw+max(c-ab,0));
o(ans);
}
treeone