Submission #122933
Source Code Expand
#include<iostream> #include<cstdio> #include<algorithm> #include<string> #include<vector> using namespace std; #define MOD 1000000007 int R, C, Y, X, D, L; int dp[30][30][900]; int rec(int y,int x,int dn){ if(y == Y) return !dn; if(dn > Y * X - y * x) return 0; //残りのデスク 残りのます if(dp[y][x][dn]) return dp[y][x][dn]; int nx = (x + 1) % X; int ny = (x + 1 == X) ? y + 1 : y; //たせたらたす return dp[y][x][dn] = (rec(ny,nx,dn-1) + rec(ny,nx,dn)) % MOD; } int main(){ cin >> R >> C; cin >> Y >> X; cin >> D >> L; cout << (rec(0,0,D) * (R-Y+1) * (C-X+1) % MOD) << endl; }
Submission Info
Submission Time | |
---|---|
Task | D - AtCoder社の冬 |
User | ei13333 |
Language | C++ (G++ 4.6.4) |
Score | 0 |
Code Size | 647 Byte |
Status | WA |
Exec Time | 2035 ms |
Memory | 1064 KB |
Judge Result
Set Name | sub | All | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 100 | 0 / 1 | ||||||||||
Status |
|
|
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 | 20 ms | 916 KB |
00_sample_02E.txt | AC | 19 ms | 924 KB |
00_sample_03E.txt | TLE | 2031 ms | 932 KB |
00_sample_04.txt | TLE | 2030 ms | 992 KB |
test_01.txt | TLE | 2030 ms | 940 KB |
test_02.txt | WA | 21 ms | 916 KB |
test_03E.txt | AC | 21 ms | 928 KB |
test_04E.txt | TLE | 2031 ms | 956 KB |
test_05.txt | WA | 22 ms | 928 KB |
test_06.txt | TLE | 2029 ms | 940 KB |
test_07E.txt | TLE | 2030 ms | 940 KB |
test_08E.txt | TLE | 2030 ms | 940 KB |
test_09.txt | TLE | 2029 ms | 936 KB |
test_10.txt | TLE | 2032 ms | 944 KB |
test_11E.txt | TLE | 2030 ms | 936 KB |
test_12E.txt | TLE | 2030 ms | 944 KB |
test_13.txt | TLE | 2033 ms | 896 KB |
test_14.txt | TLE | 2030 ms | 924 KB |
test_15E.txt | TLE | 2035 ms | 892 KB |
test_16E.txt | TLE | 2029 ms | 944 KB |
test_17.txt | WA | 29 ms | 928 KB |
test_18.txt | TLE | 2030 ms | 948 KB |
test_19E.txt | AC | 21 ms | 928 KB |
test_20E.txt | TLE | 2033 ms | 936 KB |
test_21.txt | TLE | 2030 ms | 944 KB |
test_22.txt | TLE | 2031 ms | 928 KB |
test_23E.txt | AC | 22 ms | 800 KB |
test_24E.txt | TLE | 2029 ms | 940 KB |
test_25.txt | TLE | 2029 ms | 936 KB |
test_26.txt | TLE | 2030 ms | 948 KB |
test_27E.txt | TLE | 2031 ms | 1024 KB |
test_28E.txt | TLE | 2029 ms | 932 KB |
test_29.txt | TLE | 2031 ms | 940 KB |
test_30.txt | TLE | 2030 ms | 940 KB |
test_31E.txt | TLE | 2029 ms | 936 KB |
test_32E.txt | TLE | 2030 ms | 1060 KB |
test_33.txt | WA | 21 ms | 928 KB |
test_34.txt | TLE | 2030 ms | 1064 KB |
test_35.txt | WA | 21 ms | 916 KB |
test_36E.txt | AC | 21 ms | 924 KB |
test_37E.txt | AC | 21 ms | 924 KB |
test_38E.txt | AC | 21 ms | 924 KB |
test_39E.txt | AC | 20 ms | 792 KB |
test_40.txt | TLE | 2030 ms | 944 KB |
test_41.txt | WA | 22 ms | 928 KB |
test_42.txt | TLE | 2030 ms | 944 KB |
test_43.txt | WA | 23 ms | 920 KB |
test_44.txt | TLE | 2031 ms | 944 KB |
test_45E.txt | AC | 24 ms | 928 KB |
test_46.txt | WA | 22 ms | 804 KB |
test_47E.txt | AC | 23 ms | 792 KB |
test_48.txt | WA | 21 ms | 920 KB |