ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#214814 | #2161. 小L的栈 | zhengpie | 0 | 344ms | 16252kb | C++ | 510b | 2024-11-21 22:39:46 | 2024-11-22 09:37:45 |
answer
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ioimprove(); ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define FILE(x); freopen(x".in","r",stdin); freopen(x".out","w",stdout);
int t,n,m,k,sum[1919810] = {1};
const int mod = 1e9 + 7;
signed main()
{
ioimprove();
cin>>t;
for(int i = 1;i <= 1919810;i++) sum[i] = sum[i - 1] * i % mod;
while(t--)
{
cin>>n>>m>>k;
if(m < k) {cout<<"0\n";continue;}
cout<<sum[m] / sum[m - k]<<"\n";
}
return 0;
}
Details
小提示:点击横条可展开更详细的信息
Test #1:
score: 0
Wrong Answer
time: 17ms
memory: 16240kb
input:
100 26 20 10 26 24 9 13 2 2 21 13 4 29 7 5 22 19 13 12 1 1 26 1 1 24 20 2 17 15 15 3 1 1 24 14 17 25...
output:
40 0 2 625 2520 774050 1 1 0 674358851 1 0 1 120 20160 112393141 1 1 0 1 1 2 6 1 40320 10 0 2 2 6 2 ...
result:
wrong answer 1st lines differ - expected: '514423014', found: '40'
Test #2:
score: 0
Wrong Answer
time: 17ms
memory: 16244kb
input:
100 13 6 3 12 6 3 14 14 13 24 15 9 8 6 5 4 3 1 4 3 2 18 12 7 23 11 5 24 20 14 14 7 3 27 21 17 31 17 ...
output:
120 120 178290591 936609 720 3 6 3991680 55440 203230 210 3035304 0 120 5 3 6 3 24 720 12 227020758 ...
result:
wrong answer 1st lines differ - expected: '198016', found: '120'
Test #3:
score: 0
Wrong Answer
time: 16ms
memory: 16240kb
input:
100 31 18 12 11 3 1 27 9 9 7 6 2 21 15 6 16 2 1 18 11 12 22 17 5 15 6 1 10 8 10 23 22 6 28 5 6 23 4 ...
output:
917932 3 362880 30 1858 2 0 0 6 0 0 0 24 2 24 5 5 1 7428774 19958400 840 0 2 42 6 328814650 156694 9...
result:
wrong answer 1st lines differ - expected: '661234655', found: '917932'
Test #4:
score: 0
Wrong Answer
time: 16ms
memory: 16240kb
input:
100 25 22 14 7 5 6 6 1 1 7 1 1 7 4 2 8 5 1 8 2 1 18 4 5 5 4 3 18 9 7 11 10 6 4 2 1 15 4 2 3 1 1 3 1 ...
output:
14946 0 1 1 12 5 2 0 24 181440 151200 2 12 1 1 3 10 0 337179425 0 0 2 10555 6 0 1 7920 6 1 60 3 1 0 ...
result:
wrong answer 1st lines differ - expected: '594796736', found: '14946'
Test #5:
score: 0
Wrong Answer
time: 8ms
memory: 16244kb
input:
100 29 20 6 4 4 2 6 5 3 13 9 8 5 4 4 10 5 5 30 9 11 12 12 5 8 8 4 29 5 1 16 7 2 28 8 6 3 1 1 11 11 1...
output:
0 12 60 362880 24 120 0 95040 1680 5 42 20160 1 39916800 6 185 4 1 1 591119 6 6 2 5 1858 3 24 2 120 ...
result:
wrong answer 1st lines differ - expected: '763947475', found: '0'
Test #6:
score: 0
Wrong Answer
time: 8ms
memory: 16244kb
input:
100 5 5 5 26 22 4 19 17 16 25 17 8 31 2 2 28 21 12 15 3 1 31 8 2 22 1 1 15 3 2 3 2 2 25 17 3 15 3 3 ...
output:
120 0 425606191 1172 2 200 3 56 1 6 2 2 6 0 1 11 2 120 2 40320 10555 15120 40320 98 6 2 2 1 336 1 0 ...
result:
wrong answer 1st lines differ - expected: '1', found: '120'
Test #7:
score: 0
Wrong Answer
time: 23ms
memory: 16240kb
input:
10 474 293 237 481 396 187 364 43 45 741 78 8 158 53 30 463 445 433 120 110 62 503 52 16 360 318 32 ...
output:
3 0 0 5 0 0 1 1 1 1
result:
wrong answer 1st lines differ - expected: '323352985', found: '3'
Test #8:
score: 0
Wrong Answer
time: 12ms
memory: 16244kb
input:
10 641 326 203 15 3 2 153 20 25 288 240 91 499 105 31 732 581 299 994 253 153 352 106 28 62 13 10 93...
output:
0 6 0 0 1 1 1 1 37836793 1
result:
wrong answer 1st lines differ - expected: '919680035', found: '0'
Test #9:
score: 0
Wrong Answer
time: 21ms
memory: 16240kb
input:
10 543 141 147 663 293 26 45 31 12 69 18 22 348 49 36 37 5 4 767 411 318 421 193 84 965 44 46 398 30...
output:
0 2 0 0 3 120 0 0 0 0
result:
wrong answer 2nd lines differ - expected: '536162423', found: '2'
Test #10:
score: 0
Wrong Answer
time: 20ms
memory: 16240kb
input:
10 999 387 390 189 157 55 324 281 150 954 62 8 514 147 89 331 236 171 150 46 15 979 216 59 682 175 1...
output:
0 0 0 1 1 1 1 1 0 1
result:
wrong answer 2nd lines differ - expected: '657224842', found: '0'
Test #11:
score: 0
Wrong Answer
time: 12ms
memory: 16244kb
input:
10 284 110 71 343 327 228 890 627 348 756 63 8 919 31 5 542 69 21 109 15 6 424 252 155 899 5 1 192 1...
output:
1 8 2 1 0 0 1858 0 5 0
result:
wrong answer 1st lines differ - expected: '939661935', found: '1'
Test #12:
score: 0
Wrong Answer
time: 14ms
memory: 16240kb
input:
10 957 341 186 433 199 51 760 510 73 406 179 137 739 207 230 74 43 43 881 518 106 118 100 29 724 475...
output:
3 24 0 0 0 954784168 3 0 1 0
result:
wrong answer 1st lines differ - expected: '475101795', found: '3'
Test #13:
score: 0
Wrong Answer
time: 19ms
memory: 16248kb
input:
10000 948520 153123 37633 978977 610707 430315 861510 89319 84311 89854 76753 23361 539648 26973 539...
output:
0 0 0 1 11 1 2 0 1 0 0 3 1 0 1 0 0 0 3 0 10 8 0 0 0 3 0 0 3 0 0 0 2 1 1 1 1 4 0 0 0 1 1 1 17 0 0 0 1...
result:
wrong answer 1st lines differ - expected: '224882239', found: '0'
Test #14:
score: 0
Wrong Answer
time: 16ms
memory: 16252kb
input:
10000 776217 468283 394226 679502 396921 440333 336294 175951 21262 158362 85737 87647 786586 679022...
output:
0 0 0 0 16 0 0 0 0 0 0 1 2 1 2 0 0 3 0 1 6 0 1 4 3 0 2 0 2 0 0 0 714 3 0 0 2 0 1 0 0 0 0 0 6 1 0 139...
result:
wrong answer 1st lines differ - expected: '593235084', found: '0'
Test #15:
score: 0
Wrong Answer
time: 24ms
memory: 16252kb
input:
10000 727020 72982 84798 511326 476765 238661 768301 198556 241391 42904 770 3 225143 21785 19973 71...
output:
0 3 0 1 7 0 0 0 0 5 0 2 1 0 2 0 19 1 66 0 0 145 0 1 0 0 0 0 1 43 0 1 0 0 0 0 2 9 0 0 31 1 0 0 1 0 0 ...
result:
wrong answer 2nd lines differ - expected: '264209582', found: '3'
Test #16:
score: 0
Wrong Answer
time: 20ms
memory: 16252kb
input:
10000 349236 250424 6551 245300 155779 53345 718003 538775 455477 554195 3258 1970 864269 350613 163...
output:
1 0 2 0 6 0 1 1 8 1 0 1 2 1 0 0 0 3 0 0 0 0 0 0 0 0 5 0 0 0 0 1 0 1 0 2 1 0 1 0 0 0 0 5 0 0 0 0 7 1 ...
result:
wrong answer 1st lines differ - expected: '614690665', found: '1'
Test #17:
score: 0
Wrong Answer
time: 20ms
memory: 16252kb
input:
10000 130797 50408 54584 589075 456571 10806 78159 33427 38224 303639 7008 8635 585821 448649 100079...
output:
0 0 0 0 2 0 1 0 2 0 10 0 2 1 0 0 1 0 4 0 0 0 0 0 0 0 3 0 0 8 0 107 0 0 0 1 1 5 1 0 0 0 0 1 0 3 1 1 0...
result:
wrong answer 2nd lines differ - expected: '862178676', found: '0'
Test #18:
score: 0
Wrong Answer
time: 24ms
memory: 16252kb
input:
10000 693060 190134 160913 997339 460961 184242 899251 525330 137457 513519 345024 295373 352825 155...
output:
0 7 0 0 0 0 0 1 1 1 0 0 0 0 2 4 1 3 0 3 0 4 0 0 1 0 0 0 0 10 0 0 0 0 53 0 2 0 0 0 1 53 9 0 0 2 0 1 0...
result:
wrong answer 1st lines differ - expected: '285831846', found: '0'
Test #19:
score: 0
Wrong Answer
time: 8ms
memory: 16252kb
input:
10000 933167 891532 704848 80961 67286 35337 240488 174845 21388 451269 212850 49163 948517 31409 36...
output:
14 0 4 0 0 1 0 1 7 0 0 2 2 2 1 0 0 0 3 0 1 9 0 1 7 10 0 0 2 1 0 1 0 0 0 0 2 1 0 36 0 1 0 6 0 0 0 1 1...
result:
wrong answer 1st lines differ - expected: '31241498', found: '14'
Test #20:
score: 0
Wrong Answer
time: 29ms
memory: 16252kb
input:
10000 61939 9116 2096 150659 75224 41401 13674 12474 10722 152304 47286 14033 319787 185775 135285 8...
output:
1 0 0 2 1 4 0 0 0 0 1 0 2 0 0 0 1 0 0 0 17 2 0 1 0 0 0 0 19 6 0 0 0 1 2 0 1 2 0 0 1 9 4 1 0 1 0 5 0 ...
result:
wrong answer 1st lines differ - expected: '494879849', found: '1'