Submission #1516179
Source Code Expand
#include<iostream> #include<algorithm> using namespace std; #define data_MAX 35 int mod = 1e9; int pasCal(int n, int r) { int pas[data_MAX][data_MAX]; for (int i = 0; i <= n; i++) { for (int j = 0; j <= i; j++) { if ((j== 0) || (j == i)) { pas[i][j] = 1; } else { pas[i][j] = pas[i - 1][j - 1] + pas[i - 1][j]; pas[i][j] %= mod; } } } return pas[n][r]; } int main() { int R, C, X, Y; int D, L; int ans = 0; cin >> R >> C; cin >> X >> Y; cin >> D >> L; ans = ((R - X) + 1 )*((C - Y) + 1); if (X > 0) ans *= pasCal(X*Y, X); else ans *= pasCal(X*Y, Y); ans%=mod; cout << ans<<endl; }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder社の給料 |
User | Kazuto8 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 673 Byte |
Status | RE |
Exec Time | 100 ms |
Memory | 256 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 0 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | 00_sample_01.txt, 00_sample_02.txt, test_100.txt, test_14.txt, test_29.txt, test_4.txt, test_42.txt, test_48.txt, test_54.txt, test_59.txt, test_71.txt, test_72.txt, test_84.txt, test_96.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | RE | 97 ms | 256 KB |
00_sample_02.txt | RE | 98 ms | 256 KB |
test_100.txt | RE | 98 ms | 256 KB |
test_14.txt | RE | 97 ms | 256 KB |
test_29.txt | RE | 97 ms | 256 KB |
test_4.txt | RE | 96 ms | 256 KB |
test_42.txt | RE | 100 ms | 256 KB |
test_48.txt | RE | 97 ms | 256 KB |
test_54.txt | RE | 97 ms | 256 KB |
test_59.txt | RE | 96 ms | 256 KB |
test_71.txt | RE | 97 ms | 256 KB |
test_72.txt | RE | 97 ms | 256 KB |
test_84.txt | RE | 96 ms | 256 KB |
test_96.txt | RE | 98 ms | 256 KB |