結果
問題 | No.799 赤黒かーどげぇむ |
ユーザー |
|
提出日時 | 2024-03-20 11:09:45 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,175 bytes |
コンパイル時間 | 4,452 ms |
コンパイル使用メモリ | 308,392 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-09-30 06:02:20 |
合計ジャッジ時間 | 5,383 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include<bits/stdc++.h>using namespace std;#include<atcoder/all>using namespace atcoder;#define rep(i,n) for(int i=0;i<(int)n;i++)#define rep1(i,n) for(int i=1;i<=(int)n;i++)using ll = long long;using P = pair<int, int>;using Pl = pair<ll, ll>;using vi = vector<int>;using vvi = vector<vi>;using vd = vector<double>;using vs = vector<string>;using vb = vector<bool>;using vl = vector<long long>;using vvl = vector<vl>;#define inf 2147483646//int max#define linf 900000000000000000const double PI = 3.1415926535897932384626433832795028841971;template<typename T>inline bool chmax(T& a, T b) { return ((a < b) ? (a = b, true) : (false)); }template<typename T>inline bool chmin(T& a, T b) { return ((a > b) ? (a = b, true) : (false)); }long long llceil(long long a, long long b) { if (a % b == 0) { return a / b; }return (a / b) + 1; }#define yes cout<<"Yes"<<endl;#define no cout<<"No"<<endl;int main() {int a, b, c, d; cin >> a >> b >> c >> d;int ans = 0;for (int i = a; i <= b; i++) {for (int j = c; j <= d; j++) {if (i == j)continue;ans++;}}cout << ans << endl;return 0;}