小白月赛22 E : 方格涂色

E:方格涂色

 考察点 : 思维,模拟
 坑点 :  long long    
         其他的好像没什么,读懂题意就可以 AC
         不要被样例画的图所迷惑

Code:

#include <vector>
#include <cstdio>
#include <string>
#include <cstring>
#include <iostream>
#include <algorithm>
 
using namespace std;
 
typedef long long LL;
 
LL n,m,r,c;
 
LL res = 0;
 
int main(void) {
    while(scanf("%lld%lld%lld%lld",&n,&m,&r,&c) != EOF) {
        cout << n * m - r * m - c * n + r * c << endl;
    }
    return 0;
}

猜你喜欢

转载自www.cnblogs.com/prjruckyone/p/12354345.html
今日推荐