結果
| 問題 |
No.799 赤黒かーどげぇむ
|
| コンテスト | |
| ユーザー |
ndifix
|
| 提出日時 | 2019-03-17 21:50:46 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 270 bytes |
| コンパイル時間 | 1,079 ms |
| コンパイル使用メモリ | 163,992 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-07 21:48:17 |
| 合計ジャッジ時間 | 1,696 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
#define inf 1000000000 //1E+9
using namespace std;
int main(){
int a,c,b,d;cin>>a>>b>>c>>d;
int ans=(b-a+1)*(d-c+1);
set<int> s;
for(int i=a;i<=b;i++)s.insert(i);
for(int i=c;i<=d;i++)if(s.count(i))ans--;
cout<<ans<<endl;
return 0;
}
ndifix