Submission #123050


Source Code Expand

Copy
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
//-------------------------------------------
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
//-------------------------------------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int kaijou(int n) {
  if (n > 0) return n * kaijou(n - 1);
  else return 1;
}

int main(int argc, const char * argv[])
{
  int r,c;
  cin >> r >> c;
  int x,y;
  cin >> x >> y;
  int d,l;
  cin >> d >> l;
  int xx = 1+(r-x);
  int yy = 1+(c-y);
  double result = xx * yy;
  double combi = kaijou(d+l);
  combi /= kaijou(d);
  combi /= kaijou(l);
  
  result *= combi;
  double wari = pow(10,9) + 7;
  result = result - result / wari;
  cout << result << endl;
  
  
  
  return 0;
}

Submission Info

Submission Time
Task D - AtCoder社の冬
User kikunantoka
Language C++ (G++ 4.6.4)
Score 0
Code Size 2493 Byte
Status WA
Exec Time 26 ms
Memory 932 KB

Judge Result

Set Name sub All
Score / Max Score 0 / 100 0 / 1
Status
AC × 10
WA × 15
AC × 10
WA × 42
Set Name Test Cases
sub 00_sample_01E.txt, 00_sample_02E.txt, 00_sample_03E.txt, test_03E.txt, test_04E.txt, test_07E.txt, test_08E.txt, test_11E.txt, test_12E.txt, test_15E.txt, test_16E.txt, test_19E.txt, test_20E.txt, test_23E.txt, test_24E.txt, test_27E.txt, test_28E.txt, test_31E.txt, test_32E.txt, test_36E.txt, test_37E.txt, test_38E.txt, test_39E.txt, test_45E.txt, test_47E.txt
All 00_sample_01E.txt, 00_sample_02E.txt, 00_sample_03E.txt, 00_sample_04.txt, test_01.txt, test_02.txt, test_03E.txt, test_04E.txt, test_05.txt, test_06.txt, test_07E.txt, test_08E.txt, test_09.txt, test_10.txt, test_11E.txt, test_12E.txt, test_13.txt, test_14.txt, test_15E.txt, test_16E.txt, test_17.txt, test_18.txt, test_19E.txt, test_20E.txt, test_21.txt, test_22.txt, test_23E.txt, test_24E.txt, test_25.txt, test_26.txt, test_27E.txt, test_28E.txt, test_29.txt, test_30.txt, test_31E.txt, test_32E.txt, test_33.txt, test_34.txt, test_35.txt, test_36E.txt, test_37E.txt, test_38E.txt, test_39E.txt, test_40.txt, test_41.txt, test_42.txt, test_43.txt, test_44.txt, test_45E.txt, test_46.txt, test_47E.txt, test_48.txt
Case Name Status Exec Time Memory
00_sample_01E.txt AC 21 ms 728 KB
00_sample_02E.txt AC 21 ms 932 KB
00_sample_03E.txt WA 21 ms 800 KB
00_sample_04.txt WA 22 ms 804 KB
test_01.txt WA 20 ms 800 KB
test_02.txt WA 21 ms 680 KB
test_03E.txt AC 20 ms 800 KB
test_04E.txt WA 20 ms 800 KB
test_05.txt WA 21 ms 680 KB
test_06.txt WA 21 ms 804 KB
test_07E.txt WA 20 ms 804 KB
test_08E.txt WA 21 ms 680 KB
test_09.txt WA 21 ms 800 KB
test_10.txt WA 21 ms 932 KB
test_11E.txt WA 20 ms 672 KB
test_12E.txt WA 20 ms 804 KB
test_13.txt WA 21 ms 800 KB
test_14.txt WA 21 ms 804 KB
test_15E.txt WA 20 ms 800 KB
test_16E.txt WA 26 ms 676 KB
test_17.txt WA 19 ms 676 KB
test_18.txt WA 21 ms 808 KB
test_19E.txt AC 21 ms 808 KB
test_20E.txt WA 20 ms 800 KB
test_21.txt WA 21 ms 800 KB
test_22.txt WA 21 ms 704 KB
test_23E.txt AC 20 ms 676 KB
test_24E.txt WA 20 ms 804 KB
test_25.txt WA 21 ms 928 KB
test_26.txt WA 21 ms 704 KB
test_27E.txt WA 21 ms 796 KB
test_28E.txt WA 21 ms 804 KB
test_29.txt WA 21 ms 800 KB
test_30.txt WA 20 ms 800 KB
test_31E.txt WA 21 ms 680 KB
test_32E.txt WA 21 ms 680 KB
test_33.txt WA 20 ms 804 KB
test_34.txt WA 21 ms 680 KB
test_35.txt WA 21 ms 680 KB
test_36E.txt AC 19 ms 796 KB
test_37E.txt AC 21 ms 676 KB
test_38E.txt AC 21 ms 804 KB
test_39E.txt AC 21 ms 804 KB
test_40.txt WA 21 ms 680 KB
test_41.txt WA 20 ms 804 KB
test_42.txt WA 21 ms 680 KB
test_43.txt WA 20 ms 800 KB
test_44.txt WA 20 ms 808 KB
test_45E.txt AC 21 ms 672 KB
test_46.txt WA 21 ms 700 KB
test_47E.txt WA 19 ms 792 KB
test_48.txt WA 21 ms 680 KB