結果

問題 No.799 赤黒かーどげぇむ
ユーザー log_Klog_K
提出日時 2019-03-17 21:48:27
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 2,292 bytes
コンパイル時間 788 ms
コンパイル使用メモリ 91,964 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-22 04:58:54
合計ジャッジ時間 1,796 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <string>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <climits>
#include <vector>
#include <tuple>
#include <utility>
#include <map>
#include <iterator>
#include <numeric>
#include <complex>
#include <locale>
#include <stack>
#include <queue>
using namespace std;
 
// Macro and Macro Functions
#define loop while(1)
#define Init = 0
#define rep(a, b) for(int a = 0; a < b; ++a)
#define REP(a, b, c) for(int a = b; a < c; ++a)
#define mrep(a, m) for(auto a = m.begin(); a != m.end(); ++a)
#define debug if(DEBUG)
#define int long long
#define SORT(a) sort(ALL(a))
#define REVERSE(a) reverse(ALL(a))
#define MOD 1000000007
#define ALL(a) a.begin(), a.end()
#define ALLIN(a) rep(i,a.size()) cin>>a[i]
#define ALLINDE(a) rep(i,a.size()){cin>>a[i]; --a[i];}
#define YN(a) do{if(a) cout<<"YES"; else cout<<"NO";}while(0)
#define Yn(a) do{if(a) cout<<"Yes"; else cout<<"No";}while(0)
#define yn(a) do{if(a) cout<<"yes"; else cout<<"no";}while(0)
#define spa " "
#define dspa "  "
#define ctoi(c) (c)-'0'
#define altoi(a) (a)-'a'
#define MAX 100010
 
// List of using
using ll   = signed long long;
using ull  = unsigned long long;
using pint = pair<int,  int>;
using pong = pair<long, long>;
using tint = tuple<int,  int,  int>;
using tong = tuple<long, long, long>;
using vint = vector<int>;
using vll  = vector<long long>;
using vbol = vector<bool>;
using vstr = vector<string>;
using vull = vector<unsigned long long>;
using dvin = vector<vector<int>>;
using dvbo = vector<vector<bool>>;
using mint = map<int,int>;
 
// Common Variable
bool DEBUG=false;
int INF=3141592653;

void print(){
  cout<<'\n';
}

template<class HEAD,class... TAIL>
void print(HEAD&& head,TAIL&&... tail){
  cout<<head<<spa;
  print(forward<TAIL>(tail)...);
}

void scan(){}

template<class HEAD,class... TAIL>
void scan(HEAD&& head,TAIL&&... tail){
  cin>>head;
  scan(forward<TAIL>(tail)...);
}

template<typename t>
void print(vector<t> &v){
  rep(i,v.size()){
    cout<<v[i]<<spa;
  }
  cout<<endl;
}

//--------------------------------
// Template Place

//--------------------------------
signed main(){
  int a,b,c,d; scan(a,b,c,d);
  int ans=0;
  for(int R=a;R<=b;++R){
    for(int B=c;B<=d;++B){
      if(R!=B) ++ans;
    }
  }
  cout<<ans;
}
0