#21

by asd

Submitted 4 years 10 months 1 day ago
Tue Jan 14 21:52:01 CST 2020
Judger: ZJS
Dataset Version: v0

2750 ms / 9408 KB
Final 10
Problem: lss1.dp
Language: GNU C++ 11


#1

15ms / 6912KB / Accepted
Input
1 35 68 42
59 79 25 70
46 6 65 63
92 62 28 82
37 28 43 96
54 3 5 92
17 22 83 93
27 48 96 19
13 70 39 72
95 36 100 68
34 23 12 4
12 42 65 74
45 48 69 54
60 38 58 63
79 30 42 24
43 91 36 17
43 41 7 89
6 47 49 65
51 71 30 91
49 94 2 7
55 8<...>
Output
392141484
796237269
221949171
507960909
146582013
91294836
959402133
544472058
392312299
727465936
622036361
296986481
541849778
68435793
126377243
976024134
631756300
578939090
113094226
333245833
412576069
397319000
628028412
494710283
858712716
78886286<...>
Answer
392141484
796237269
221949171
507960909
146582013
91294836
959402133
544472058
392312299
727465936
622036361
296986481
541849778
68435793
126377243
976024134
631756300
578939090
113094226
333245833
412576069
397319000
628028412
49471<...>
Checker Information
100 tokens

#2

15ms / 6916KB / Accepted
Input
69 64 71 74
81 3 86 93
100 3 28 14
25 44 26 28
82 62 73 24
94 6 33 4
43 93 32 26
1 65 87 23
75 14 61 88
34 36 71 71
68 97 61 12
95 41 51 86
26 20 25 96
3 59 95 77
94 79 67 72
65 19 85 52
88 1 53 20
58 11 27 61
28 77 16 71
10 65 59 44
88<...>
Output
270766063
899563774
664152661
157881190
932645772
376606265
61674287
238784236
808237758
260641984
234608113
483465633
910242723
624633530
79004961
830954378
785264876
873736359
935738630
289307465
695350815
896363123
150603502
368617455
657595129
99145031<...>
Answer
270766063
899563774
664152661
157881190
932645772
376606265
61674287
238784236
808237758
260641984
234608113
483465633
910242723
624633530
79004961
830954378
785264876
873736359
935738630
289307465
695350815
896363123
150603502
36861<...>
Checker Information
100 tokens

#3

15ms / 6916KB / Accepted
Input
27 36 84 37
30 54 39 86
60 24 49 25
56 45 67 58
26 12 27 19
97 50 2 56
43 65 16 85
97 43 14 76
7 27 73 49
6 5 30 74
94 76 13 27
42 37 37 66
53 57 95 15
56 83 39 37
42 31 32 16
87 38 12 26
35 63 51 91
53 17 54 94
55 34 63 9
57 4 35 4
14 <...>
Output
24971033
117452597
596827600
384089337
752903676
91185332
464160560
122839623
582590060
857250154
946724592
765712665
311711114
656572517
441312022
312098791
119333708
409448351
166344562
499795089
155839901
701925573
831295404
566653045
803500287
47248259<...>
Answer
24971033
117452597
596827600
384089337
752903676
91185332
464160560
122839623
582590060
857250154
946724592
765712665
311711114
656572517
441312022
312098791
119333708
409448351
166344562
499795089
155839901
701925573
831295404
56665<...>
Checker Information
100 tokens

#4

30ms / 6916KB / Accepted
Input
74 96 1 10
69 73 62 90
27 69 32 59
80 75 23 11
92 83 53 11
65 75 65 96
75 61 56 3
48 23 22 73
96 6 90 78
55 44 51 95
40 73 13 82
68 63 13 29
24 9 16 9
87 5 35 60
7 46 59 20
93 68 1 67
75 57 33 88
23 84 22 48
49 84 77 32
77 19 83 24
57 8<...>
Output
976742326
751783569
585549793
245367053
804979009
691093218
982360358
482938323
382602839
107098426
713747675
222754184
682753635
828212464
485993129
938663648
350637952
421622729
510126937
591431182
505810297
733234721
230111126
623428382
778798613
255635<...>
Answer
976742326
751783569
585549793
245367053
804979009
691093218
982360358
482938323
382602839
107098426
713747675
222754184
682753635
828212464
485993129
938663648
350637952
421622729
510126937
591431182
505810297
733234721
230111126
623<...>
Checker Information
100 tokens

#5

31ms / 6916KB / Accepted
Input
90 76 71 46
66 34 50 51
33 8 83 15
83 23 68 97
88 32 42 11
39 22 80 6
47 9 48 52
23 90 60 77
29 56 87 67
78 54 61 15
32 62 4 49
7 98 56 83
82 97 22 53
25 48 56 22
75 77 36 19
54 75 99 60
89 44 36 23
81 48 33 54
2 51 79 27
64 56 100 62
4<...>
Output
176905506
870801118
906115698
733670767
607907983
89891823
944057710
457789767
46585309
662184636
899253075
220905081
403701566
87517758
985225739
935732882
351514769
449373780
462609413
795596467
17798909
335162437
623362126
500881689
323649575
340372727
<...>
Answer
176905506
870801118
906115698
733670767
607907983
89891823
944057710
457789767
46585309
662184636
899253075
220905081
403701566
87517758
985225739
935732882
351514769
449373780
462609413
795596467
17798909
335162437
623362126
5008816<...>
Checker Information
100 tokens

#6

31ms / 6920KB / Accepted
Input
8 23 55 9
91 45 39 46
24 5 55 40
82 25 79 26
95 24 34 31
46 88 47 31
90 51 17 6
98 36 64 39
9 25 31 10
73 21 75 38
62 35 56 94
76 85 7 57
33 42 20 83
84 80 80 85
19 26 37 68
78 20 29 38
96 57 92 38
33 94 2 61
8 76 81 37
91 20 75 85
30 5<...>
Output
794882784
677105194
841835616
578735890
163638462
753900909
945425906
588750030
118090939
154942786
230137440
110693109
991316605
862993161
357279745
622681815
178778159
495229426
822515144
47670019
151256546
157591029
956777411
25960797
139980810
85163292<...>
Answer
794882784
677105194
841835616
578735890
163638462
753900909
945425906
588750030
118090939
154942786
230137440
110693109
991316605
862993161
357279745
622681815
178778159
495229426
822515144
47670019
151256546
157591029
956777411
2596<...>
Checker Information
100 tokens

#7

0ms / 6920KB / Accepted
Input
62 97 94 68
39 71 39 47
72 18 56 77
34 59 53 61
2 27 66 56
49 94 60 35
34 94 93 74
12 91 4 38
99 28 69 95
48 80 49 90
76 70 32 50
100 37 50 99
55 32 44 24
68 86 35 62
67 5 94 17
85 24 9 54
70 49 68 93
91 15 12 31
100 5 44 28
59 7 96 75
<...>
Output
157690396
828830545
329011036
384052780
290578834
684863916
756133417
352301689
504599602
306083456
313644600
362700960
929098551
235722944
339373824
105079594
931596363
343589431
867337684
239140292
741712240
862709035
339588473
886852585
211832207
590422<...>
Answer
157690396
828830545
329011036
384052780
290578834
684863916
756133417
352301689
504599602
306083456
313644600
362700960
929098551
235722944
339373824
105079594
931596363
343589431
867337684
239140292
741712240
862709035
339588473
886<...>
Checker Information
100 tokens

#8

15ms / 6916KB / Accepted
Input
67 90 30 24
71 33 57 88
84 23 67 40
92 6 54 61
30 88 87 60
57 46 18 43
67 55 53 89
32 20 61 34
99 77 68 39
8 54 21 15
43 23 17 70
48 61 64 8
44 18 31 94
18 27 15 77
93 72 21 35
94 67 55 65
13 1 76 65
80 77 52 1
62 90 78 44
45 35 73 86
4<...>
Output
648473591
307721416
401623152
972351988
270015268
854013882
80279035
827377694
506213725
762133871
528227028
970997175
97685887
206920131
313270681
261998738
163626502
129288777
436454695
136546740
131047984
18606209
552141288
372648816
462677732
779453311<...>
Answer
648473591
307721416
401623152
972351988
270015268
854013882
80279035
827377694
506213725
762133871
528227028
970997175
97685887
206920131
313270681
261998738
163626502
129288777
436454695
136546740
131047984
18606209
552141288
372648<...>
Checker Information
100 tokens

#9

15ms / 6916KB / Accepted
Input
34 41 46 79
95 69 1 86
82 49 86 34
73 11 57 33
36 7 2 83
38 28 72 61
96 34 69 44
12 43 4 72
94 13 35 80
59 35 62 31
44 92 7 27
85 20 28 89
25 36 94 25
28 68 83 95
90 87 47 6
60 51 38 41
4 78 57 79
26 12 1 43
16 17 96 44
42 69 7 5
14 26 <...>
Output
298737236
891657818
842564622
391939542
747396963
327804093
168430539
203042933
401381324
135005211
474132422
299633951
581246462
130347150
846934267
118962096
469248859
207793687
539861650
60492651
581943223
402139771
453897067
30204327
540634271
73105756<...>
Answer
298737236
891657818
842564622
391939542
747396963
327804093
168430539
203042933
401381324
135005211
474132422
299633951
581246462
130347150
846934267
118962096
469248859
207793687
539861650
60492651
581943223
402139771
453897067
3020<...>
Checker Information
100 tokens

#10

46ms / 6916KB / Accepted
Input
11 9 16 89
8 98 100 41
86 38 5 55
13 14 93 100
30 52 84 83
65 1 34 38
11 69 58 84
33 42 9 69
2 100 85 38
93 57 84 70
11 13 88 41
16 64 36 21
35 75 78 98
87 79 34 54
50 76 35 25
93 25 85 13
14 56 23 5
61 85 74 63
23 98 54 23
7 18 38 51
3<...>
Output
312652206
878051179
514217180
543718402
127476672
742705820
928776412
534243745
4215583
565916656
968191410
620670561
349180778
220975532
138943626
371385836
864210749
127030128
471670564
907740035
908939095
569082477
600366636
48517893
571101324
791989563<...>
Answer
312652206
878051179
514217180
543718402
127476672
742705820
928776412
534243745
4215583
565916656
968191410
620670561
349180778
220975532
138943626
371385836
864210749
127030128
471670564
907740035
908939095
569082477
600366636
48517<...>
Checker Information
100 tokens

#11

0ms / 6916KB / Accepted
Input
1 1 1 1
1 1 1 2
1 1 1 3
1 1 2 1
1 1 2 2
1 1 2 3
1 1 3 1
100 100 100 100
100 100 1 1
100 100 100 1
100 100 1 100
1 100 100 100
100 1 100 100
Output
1
1
1
1
2
3
1
314203864
1
214240902
214240902
187867257
187867257
Answer
1
1
1
1
2
3
1
314203864
1
214240902
214240902
187867257
187867257
Checker Information
13 tokens

#1

2750ms / 9408KB / Time Limit Exceeded
Input
501 335 468 42
359 479 725 170
146 706 465 963
492 962 828 282
437 828 943 996
154 903 605 392
717 422 383 293
727 448 896 719
913 870 539 772
895 36 300 668
334 323 812 704
712 142 665 674
645 548 869 254
860 38 758 663
779 530 742 724
843 <...>
Output

												
Answer

												
Checker Information

											

#1

0ms / 0KB / Runtime Error
Input
57677 64070 59482 92239
76054 5856 77883 37818
37023 49382 39029 71066
96273 67457 26197 574
79051 68952 23563 75403
70232 41503 23486 47414
40359 96794 28322 48232
68686 90901 58918 29908
8551 31140 83285 88999
17440 59567 73978 8814
31898 14680<...>
Output

												
Answer

												
Checker Information
Exit code is 11
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <queue>
#include <map>
#include <string.h>
#include <math.h>
#include <stdio.h>
#include <deque>
#include <bits/stdc++.h>
//#include "testlib.h"
using namespace std;
#define ll long long
#define pii pair<int,int>
#define qi ios::sync_with_stdio(0)

bool debug=true;

/*    *************************************
	  * Written in New Computer           *
	  * The following code belongs to     *
	  * XiaoGeNintendo of HellHoleStudios *
	  *************************************
*/
template<typename T1,typename T2>ostream& operator<<(ostream& os,pair<T1,T2> ptt){
	os<<ptt.first<<","<<ptt.second;
	return os;
}
template<typename T>ostream& operator<<(ostream& os,vector<T> vt){
	os<<"{";
	for(int i=0;i<vt.size();i++){
		os<<vt[i]<<" ";
	}
	os<<"}";
	return os;
}

ll f[1005][1005];
ll a,b,c,d;
const ll mod=1e9+7;

int main(int argc,char* argv[]){
	
	while(cin>>a>>b>>c>>d){
		f[1][1]=1;
		for(int i=1;i<=c;i++){
			for(int j=1;j<=d;j++){
				if(i==1 && j==1){
					continue;
				}
				f[i][j]=(a*f[i-1][j]%mod+b*f[i][j-1]%mod)%mod;
			}
		}
		cout<<f[c][d]<<endl;
	}
	return 0;
}