ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#186487 | #3351. 霜冻碎片 | joy20101 | 100 | 29ms | 1364kb | C++11 | 283b | 2023-10-01 09:01:10 | 2023-10-01 12:32:33 |
answer
#include<bits/stdc++.h>
using namespace std;
int n,m,a[205][205],ans;
int main(){
cin>>n>>m;
for(int i=1;i<=n;i++)
for(int j=1;j<=m;j++)
cin>>a[i][j];
for(int i=(n%3==0?2:1);i<=n;i+=3)
for(int j=(m%3==0?2:1);j<=m;j+=3)
ans+=a[i][j];
cout<<ans;
return 0;
}
Details
小提示:点击横条可展开更详细的信息
Test #1:
score: 10
Accepted
time: 0ms
memory: 1200kb
input:
2 10 4 5 4 4 4 4 2 2 1 1 4 5 4 4 4 4 2 2 1 1
output:
11
result:
ok 1 number(s): "11"
Test #2:
score: 10
Accepted
time: 0ms
memory: 1200kb
input:
3 6 2 2 2 3 3 1 3 4 3 5 5 3 2 3 2 4 4 3
output:
9
result:
ok 1 number(s): "9"
Test #3:
score: 10
Accepted
time: 0ms
memory: 1200kb
input:
4 5 3 4 4 4 3 4 6 5 5 3 5 7 6 6 4 3 5 4 4 2
output:
14
result:
ok 1 number(s): "14"
Test #4:
score: 10
Accepted
time: 5ms
memory: 1356kb
input:
191 182 2 2 3 2 2 1 1 1 1 0 2 2 3 1 1 1 3 5 4 3 2 3 2 1 1 2 3 4 3 2 2 3 4 3 2 2 2 4 4 5 5 6 5 3 2 2 ...
output:
17471
result:
ok 1 number(s): "17471"
Test #5:
score: 10
Accepted
time: 5ms
memory: 1356kb
input:
189 187 3 5 5 5 4 4 4 5 5 3 2 2 3 2 1 1 2 4 4 3 2 2 4 4 4 2 3 2 4 3 4 4 4 3 3 4 6 5 5 5 4 4 4 5 5 5 ...
output:
17802
result:
ok 1 number(s): "17802"
Test #6:
score: 10
Accepted
time: 2ms
memory: 1344kb
input:
181 187 1 2 4 4 3 3 4 5 4 3 3 3 4 5 4 2 1 1 2 2 4 4 4 2 2 2 4 4 4 4 4 5 3 2 0 2 3 3 2 1 2 2 2 2 1 3 ...
output:
16786
result:
ok 1 number(s): "16786"
Test #7:
score: 10
Accepted
time: 2ms
memory: 1364kb
input:
200 197 4 5 3 2 2 3 3 3 4 4 4 3 4 5 5 4 3 3 2 2 2 3 3 4 5 5 3 2 2 3 2 2 2 2 2 1 3 2 3 2 3 3 3 2 1 1 ...
output:
19623
result:
ok 1 number(s): "19623"
Test #8:
score: 10
Accepted
time: 6ms
memory: 1360kb
input:
196 184 2 2 2 3 4 4 3 4 4 3 2 2 3 2 1 2 4 4 4 3 4 3 2 1 1 3 4 3 2 3 5 6 5 4 3 3 4 3 3 2 4 4 4 2 2 2 ...
output:
18159
result:
ok 1 number(s): "18159"
Test #9:
score: 10
Accepted
time: 5ms
memory: 1352kb
input:
185 192 4 5 4 2 2 1 3 3 3 2 1 1 1 1 2 3 5 6 6 5 5 5 6 4 2 2 3 5 5 6 5 4 3 3 3 3 3 3 4 3 3 1 2 3 5 4 ...
output:
17796
result:
ok 1 number(s): "17796"
Test #10:
score: 10
Accepted
time: 4ms
memory: 1356kb
input:
192 185 3 3 2 2 4 4 4 3 2 2 2 3 4 3 3 1 1 0 2 3 5 5 4 3 2 4 4 4 3 3 3 4 4 3 2 2 4 4 5 3 3 2 2 2 1 3 ...
output:
17644
result:
ok 1 number(s): "17644"