题目:1854. 晋升计数
题解:重后往前推
#include<bits/stdc++.h>
#define x first
#define y second
using namespace std;
typedef long long LL;
typedef pair<int ,string> PII;
const int N=1e5+10;
const int mod=100000007;
int main(){
int a[5][5];
for(int i=0;i<4;i++){
cin>>a[i][0]>>a[i][1];
}
int t=0;//晋级的人数
int b[5];
for(int i=3;i>0;i--){
t=a[i][1]-a[i][0]+t;
b[3-i]=t;
}
for(int i=2;i>=0;i--)
cout<<b[i]<<endl;
return 0;
}