ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#186461 | #3351. 霜冻碎片 | gaojieming | 100 | 16ms | 1356kb | C++11 | 596b | 2023-10-01 08:46:20 | 2023-10-01 12:32:05 |
answer
#include<bits/stdc++.h>
#define ll long long
#define il inline
#define pn putchar('\n')
#define maxint 2147483647
#define min(x,y) (x<y?x:y)
#define max(x,y) (x>y?x:y)
#define maxn 205
using namespace std;
int n,m,ans;
int a[maxn][maxn];
signed main()
{
#ifndef ONLINE_JUDGE
freopen("in.txt","r",stdin);
#endif
scanf("%d%d",&n,&m);
for(int i=1;i<=n;i++)
for(int j=1;j<=m;j++)
scanf("%d",&a[i][j]);
for(int i=n%3?1:2;i<=n;i+=3)
for(int j=m%3?1:2;j<=m;j+=3)
ans+=a[i][j];
printf("%d",ans);
return 0;
}
Details
小提示:点击横条可展开更详细的信息
Test #1:
score: 10
Accepted
time: 0ms
memory: 1188kb
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: 1188kb
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: 1192kb
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: 2ms
memory: 1348kb
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: 2ms
memory: 1344kb
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: 3ms
memory: 1336kb
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: 3ms
memory: 1356kb
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: 2ms
memory: 1352kb
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: 2ms
memory: 1340kb
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: 2ms
memory: 1344kb
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"