QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#371363 | #6311. 火车站 | LVJBot1 | 0 | 0ms | 1600kb | C++14 | 894b | 2024-03-30 08:43:37 | 2024-03-30 08:43:38 |
answer
/* Submission UUID: f1a316df-9e69-4e71-b1f4-e7181d09441b. */
#include<cstdio>
using namespace std;int a,n,m,x,u=1,z,y;int main(){scanf("%d %d %d %d",&a,&n,&m,&x);if(n<=5){if(n==2||n==3)printf("%d",a);else if(n==4){if(x==1||x==2) printf("%d",a);else if(x==3) printf("%d",a*2);}else if(n==5){if(x==1||x==2) printf("%d",a);else if(x==3) printf("%d",a*2);else if(x==4)printf("%d",(m-a*3)/2+a*2);}}else{int p=1,q=0,k=0,sum1=0;for(int i=1;i<=n-5;i++){k=p+q;sum1+=k;p=q;q=k;}int s1=sum1+2;int e=0,t=1,g=0,sum2=0;for(int i=1;i<=n-5;i++){g=e+t;sum2+=g;e=t;t=g;}int s2=sum2+1;int S=(m-s1*a)/s2;q=k=e=g=sum1=sum2=0;p=t=1;if(x<=5){if(x==1||x==2) printf("%d",a);else if(x==3) printf("%d",a*2);else if(x==4) printf("%d",S+a*2);else printf("%d",S*2+a*3);}else{for(int i=1;i<=x-4;i++){k=p+q;sum1+=k;p=q;q=k;}sum1+=2;for(int i=1;i<=x-4;i++){g=e+t;sum2+=g;e=t;t=g;}sum2+=1;printf("%d",sum1*a+sum2*S);}}return 0;}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 1440kb
input:
46 50 24 38 39 14 18 38 41 38 40 38 44 1 9 20 32 2 31 6 23 4 11 38 40 38 40 24 30 10 32 1 15 13 30 7 29 3 7 15 36 17 30 5 9 38 44 38 46 22 29 2 25 4 32 38 44 38 45 33 36 1 20 38 41 38 40 9 20 23 26 38 40 29 31 8 23 2 6 1 24 10 29 38 42 38 42 38 40 38 44 5 8 38 45 10 20 14 34 9 33 16 28
output:
710954054
result:
wrong answer 1st numbers differ - expected: '1', found: '710954054'
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 1504kb
input:
46 49 22 25 28 5 14 24 29 43 46 13 14 5 14 9 14 12 14 24 33 18 33 3 14 17 40 26 32 1 14 43 46 33 36 4 14 43 44 20 21 2 14 25 30 23 28 43 45 43 46 29 38 43 45 3 14 9 14 11 14 13 14 33 38 25 41 9 14 3 14 1 14 3 14 43 46 30 38 10 14 3 14 9 14 31 33 17 38 6 14 6 14 10 14 5 14 11 14 17 20
output:
1271901
result:
wrong answer 1st numbers differ - expected: '17', found: '1271901'
Test #3:
score: 0
Wrong Answer
time: 0ms
memory: 1564kb
input:
4901 4742 2784 1660 2698 1184 1582 3644 3650 860 1582 12 1582 4284 4750 693 1582 4284 4420 530 1582 4284 4778 213 1582 1346 1582 2456 3284 1951 2247 2526 3899 1748 3843 1840 4158 1847 3233 2710 4082 17 1582 1217 1582 2732 3868 2176 3652 1440 1582 3392 3778 115 1582 51 1582 4284 4410 343 1582 696 158...
output:
-846784262
result:
wrong answer 1st numbers differ - expected: '1584', found: '-846784262'
Test #4:
score: 0
Wrong Answer
time: 0ms
memory: 1540kb
input:
4752 4916 2637 631 1748 1958 2543 976 1748 4059 4176 1753 2555 1293 1748 400 1748 1531 1748 439 1748 814 1748 752 1748 4059 4745 1500 1748 410 1748 4059 4543 860 1748 3244 3846 1484 1748 2949 3200 365 1748 490 1748 533 1748 159 1748 2145 3211 938 1748 2104 2499 4059 4568 1321 1748 114 1748 257 1748 ...
output:
810782048
result:
wrong answer 1st numbers differ - expected: '1750', found: '810782048'
Test #5:
score: 0
Wrong Answer
time: 0ms
memory: 1568kb
input:
4638 4800 2174 763 2920 3689 3981 1696 1863 2225 3298 4041 4197 514 565 955 2677 982 1067 4041 4426 369 565 1280 1583 2033 2897 4041 4147 2216 3385 2470 3479 4041 4231 284 565 333 565 4041 4496 2471 3315 156 565 1449 2938 1754 3500 1634 3795 236 565 4041 4626 934 3865 2513 2835 239 565 1239 3066 136...
output:
1687395721
result:
wrong answer 1st numbers differ - expected: '567', found: '1687395721'
Test #6:
score: 0
Wrong Answer
time: 0ms
memory: 1580kb
input:
193872 190790 1 1 55918 61723 111652 61723 106905 61723 146471 8591 47114 3781 26833 61723 175724 61723 105145 12561 22256 61723 167628 61723 152637 61723 89452 61723 126604 61723 87227 61723 80698 61723 72291 61723 96877 61723 122100 61723 83795 10417 42641 61723 158895 61723 107569 61723 164698 61...
output:
193872
result:
wrong answer 1st numbers differ - expected: '781', found: '193872'
Test #7:
score: 0
Wrong Answer
time: 0ms
memory: 1584kb
input:
183551 186029 1 1 18923 46775 110591 46775 147364 46775 151335 46775 154945 46775 178847 46775 173705 46775 91772 46775 81093 46775 103570 46775 66868 46775 91670 46775 129650 46775 149481 46775 182893 46775 115551 46775 167292 46775 182574 46775 95438 46775 167281 46775 160712 46775 121691 46775 12...
output:
183551
result:
wrong answer 1st numbers differ - expected: '745', found: '183551'
Test #8:
score: 0
Wrong Answer
time: 0ms
memory: 1596kb
input:
180643 198737 94738 48353 166027 87663 136789 93307 135408 19654 33351 26552 33351 19265 33351 111942 134907 65187 149795 119612 170991 2417 33351 79279 166110 114686 162975 54701 163928 43129 116584 66103 139188 107280 147888 26067 33351 104751 139808 63876 148071 39714 129382 72905 148130 25384 33...
output:
-157273975
result:
wrong answer 1st numbers differ - expected: '33355', found: '-157273975'
Test #9:
score: 0
Wrong Answer
time: 0ms
memory: 1580kb
input:
191508 185305 100905 63990 91135 7954 91135 17174 91135 39427 91135 1129 91135 78418 91135 75781 91135 7987 91135 51528 91135 148938 181214 40890 91135 67657 91135 56216 91135 29882 91135 33981 91135 76412 91135 115229 151727 98300 104478 182577 190282 125477 163728 68488 91135 64154 91135 20562 911...
output:
843273168
result:
wrong answer 1st numbers differ - expected: '91137', found: '843273168'
Test #10:
score: 0
Wrong Answer
time: 0ms
memory: 1600kb
input:
191846 183854 90869 55728 85721 9713 85721 57235 85721 130204 144564 77210 85721 161065 162256 8962 85721 168055 177244 168055 174207 6371 85721 89768 136908 45508 85721 168055 185778 35520 85721 43450 85721 18758 85721 161027 162664 73184 85721 11364 85721 45366 85721 121115 163577 168055 190467 16...
output:
716285504
result:
wrong answer 1st numbers differ - expected: '85723', found: '716285504'