54 lines
1.6 KiB
C++
54 lines
1.6 KiB
C++
#include <algorithm>
|
|
#include <cstdio>
|
|
#include <iostream>
|
|
#include <vector>
|
|
using namespace std;
|
|
|
|
// ----- FILE IO -----
|
|
#define STDIN(filename) freopen(filename, "r", stdin)
|
|
#define STDOUT(filename) freopen(filename, "w", stdout)
|
|
#define NL '\n'
|
|
|
|
// ----- FOR LOOPS -----
|
|
#define F(i,L,R) for (int i = L; i < R; i++)
|
|
#define FE(i,L,R) for (int i = L; i <= R; i++)
|
|
#define FD(i,L,R) for (int i = L; i > R; i--)
|
|
#define FDE(i,L,R) for (int i = L; i >= R; i--)
|
|
|
|
// ----- WEZ -----
|
|
#define takeI(n) int (n); cin >> n
|
|
#define takeII(n,m) int (n),(m); cin >> n >> m
|
|
#define takeIII(n,m,k) int (n),(m),(k); cin >>(n) >> (m) >> (k)
|
|
|
|
// ----- MAX MIN -----
|
|
#define REMAX(a,b) (a)=max((a),(b))
|
|
#define REMIN(a,b) (a)=min((a),(b))
|
|
|
|
// ----- DEBUG -----
|
|
#define DBG(vari) cerr<<#vari<<" = "<<(vari)<<endl
|
|
#define printA(a,L,R) FE(i,L,R) cout << a[i] << (i==R?'\n':' ')
|
|
#define printV(a) printA(a,0,a.size()-1)
|
|
|
|
// ----- STL DS
|
|
#define ALL(c) (c).begin(),(c).end()
|
|
|
|
int main() {
|
|
STDIN("promote.in");
|
|
STDOUT("promote.out");
|
|
|
|
int bronzeBefore, bronzeAfter, silverBefore, silverAfter, goldBefore, goldAfter, platinumBefore, platinumAfter;
|
|
cin >> bronzeBefore >> bronzeAfter >> silverBefore >> silverAfter >> goldBefore >> goldAfter >> platinumBefore >> platinumAfter;
|
|
|
|
int platinumPromotion, goldPromotion, silverPromotion;
|
|
|
|
platinumPromotion = platinumAfter - platinumBefore;
|
|
|
|
goldBefore -= platinumPromotion;
|
|
goldPromotion = goldAfter - goldBefore;
|
|
|
|
silverBefore -= goldPromotion;
|
|
silverPromotion = silverAfter - silverBefore;
|
|
|
|
cout << silverPromotion << NL << goldPromotion << NL << platinumPromotion << endl;
|
|
}
|