ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#213076 | #584. t3 | zongyuchen | 0 | 11546ms | 1580kb | C++ | 515b | 2024-11-09 19:15:04 | 2024-11-09 23:06:12 |
answer
#include<bits/stdc++.h>
using namespace std;
int m,n,a[100001],s,l,r,x;
int main(){
scanf("%d %d",&n,&m);
for(int i=1;i<=n;i++){
scanf("%d",&a[i]);
}for(int i=1;i<=m;i++){
scanf("%d %d %d %d",&s,&l,&r,&x);
if(s==1){
for(int i=l;i<=r;i++){
a[i]+=x;
}
}else if(s==2){
for(int i=l;i<=r;i++){
a[i]=x;
}
}else{
int ans=0,p=1;
for(int i=l;i<=r;i++){
p=1;
for(int j=0;j<x;j++){
p*=a[i];
}
ans+=p;
}
printf("%d\n",ans);
}
}
}
详细
小提示:点击横条可展开更详细的信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 1192kb
input:
458 823 14431 9895 11970 15308 2575 20181 709 27999 12992 18884 11061 16281 5044 28990 25092 28337 3...
output:
-831137285 1099140635 -1470103552 604455552 278477824 -1649748854 1464265353 -637058110 2109180822 1...
result:
wrong answer 1st lines differ - expected: '806084096', found: '-831137285'
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 1196kb
input:
481 526 8409 14498 18636 10027 24362 32458 17986 17730 11956 19192 2193 1034 29317 19284 16210 26242...
output:
-2023806981 1555304699 -1074360311 -2107013120 133 383728080 337920847 -1733184643 -475747336 855471...
result:
wrong answer 1st lines differ - expected: '867105097', found: '-2023806981'
Test #3:
score: 0
Wrong Answer
time: 2147ms
memory: 1576kb
input:
100000 100000 15247 4194 9619 4532 22058 2667 21549 16652 25327 12018 13395 11426 7243 11714 22904 2...
output:
54433 1544457748 352487648 82525935 532381851 1235929457 38218 30045720 19138 459644406 33559 203095...
result:
wrong answer 2nd lines differ - expected: '544457741', found: '1544457748'
Test #4:
score: 0
Wrong Answer
time: 2137ms
memory: 1580kb
input:
100000 100000 6264 26207 28424 24165 4852 20798 5803 18679 24588 12238 25786 28622 19900 101 25922 2...
output:
18923 13111195 41716 34447 32091 80654 -1563787005 9973 523560023 19797 -1135177818 695071461 3136 9...
result:
wrong answer 7th lines differ - expected: '731180277', found: '-1563787005'
Test #5:
score: 0
Wrong Answer
time: 2406ms
memory: 1576kb
input:
100000 100000 15043 9299 7163 25384 24996 3803 24356 12466 22073 12987 8931 14997 3951 32704 23076 8...
output:
-384193934 6296 588341566 1217615666 180064833 683 -693657671 63953 57030 17635 81114240 5280 57193 ...
result:
wrong answer 1st lines differ - expected: '754347097', found: '-384193934'
Test #6:
score: 0
Wrong Answer
time: 2541ms
memory: 1580kb
input:
100000 100000 14736 16956 19864 23894 29403 5507 12182 6188 17192 14440 18618 3970 15396 15037 23334...
output:
17008 73008 935797904 1016519319 15383 25232 -1278274110 75334 25854 46510 797344028 -1777809817 -18...
result:
wrong answer 4th lines differ - expected: '16519312', found: '1016519319'
Test #7:
score: 0
Wrong Answer
time: 1084ms
memory: 1384kb
input:
50000 50000 17799 29763 25337 21321 1391 31852 27418 28753 18524 14044 15976 18893 12274 22834 11348...
output:
19498 1348187808 1670094343 843277290 -123165936 545403947 675282944 138019456 -1189437630 -47376373...
result:
wrong answer 2nd lines differ - expected: '473297203', found: '1348187808'
Test #8:
score: 0
Wrong Answer
time: 1231ms
memory: 1384kb
input:
50000 50000 10654 14956 14287 25326 8102 30579 11682 23553 272 22672 14460 30241 13026 12738 4912 72...
output:
-6776320 140916081 -1616036434 1613308525 -1713588278 1973456743 10388 4939 1882086584 481400272 -16...
result:
wrong answer 1st lines differ - expected: '717018991', found: '-6776320'
Test #9:
score: 0
Time Limit Exceeded
input:
90000 90000 29538 28214 24706 30393 27759 9002 13458 10243 15713 14881 10630 5593 7942 24578 29370 1...
output:
-1404054128 738703020 3888 402391875 37270 -1799972864 1273399899 1773331828 1719614142 1939880364 9...
result:
Test #10:
score: 0
Time Limit Exceeded
input:
100000 100000 23515 49 31372 25112 16779 21279 30735 32743 14678 15189 1763 23114 32215 14873 20487 ...
output:
2010992798 -2104490197 1332325961 -290765440 421321642 1078202980 -575456866 711893358 -607895270 63...