#include "artclass.h"
#include <bits/stdc++.h>
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500])
{
long long ans = 0;
for (int x = 0; x < H; x++)
for (int y = 0; y < W - 1; x++)
{
int grayscale1 = R[x][y] + G[x][y] + B[x][y];
int grayscale2 = R[x][y + 1] + G[x][y + 1] + B[x][y + 1];
ans += abs(grayscale1 / 3 - grayscale2 / 3);
}
ans /= (H * W);
if (ans < 10)
return 4;
if (ans < 30)
return 1;
if (ans < 54)
return 2;
return 3;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
5032 ms |
5204 KB |
Time limit exceeded |
2 |
Execution timed out |
5023 ms |
4944 KB |
Time limit exceeded |
3 |
Execution timed out |
5030 ms |
5468 KB |
Time limit exceeded |
4 |
Execution timed out |
5048 ms |
4436 KB |
Time limit exceeded |
5 |
Execution timed out |
5024 ms |
6152 KB |
Time limit exceeded |
6 |
Execution timed out |
5056 ms |
5204 KB |
Time limit exceeded |
7 |
Execution timed out |
5041 ms |
4948 KB |
Time limit exceeded |
8 |
Execution timed out |
5050 ms |
4692 KB |
Time limit exceeded |
9 |
Execution timed out |
5071 ms |
4956 KB |
Time limit exceeded |
10 |
Execution timed out |
5012 ms |
4688 KB |
Time limit exceeded |
11 |
Execution timed out |
5039 ms |
5712 KB |
Time limit exceeded |
12 |
Execution timed out |
5036 ms |
5972 KB |
Time limit exceeded |
13 |
Execution timed out |
5012 ms |
3664 KB |
Time limit exceeded |
14 |
Execution timed out |
5064 ms |
4188 KB |
Time limit exceeded |
15 |
Execution timed out |
5043 ms |
5200 KB |
Time limit exceeded |
16 |
Execution timed out |
5019 ms |
5456 KB |
Time limit exceeded |
17 |
Execution timed out |
5022 ms |
4944 KB |
Time limit exceeded |
18 |
Execution timed out |
5038 ms |
3668 KB |
Time limit exceeded |
19 |
Execution timed out |
5010 ms |
6128 KB |
Time limit exceeded |
20 |
Execution timed out |
5053 ms |
5972 KB |
Time limit exceeded |
21 |
Execution timed out |
5047 ms |
4692 KB |
Time limit exceeded |
22 |
Execution timed out |
5046 ms |
5128 KB |
Time limit exceeded |
23 |
Execution timed out |
5026 ms |
4636 KB |
Time limit exceeded |
24 |
Execution timed out |
5034 ms |
3676 KB |
Time limit exceeded |
25 |
Execution timed out |
5073 ms |
5056 KB |
Time limit exceeded |
26 |
Execution timed out |
5005 ms |
5296 KB |
Time limit exceeded |
27 |
Execution timed out |
5023 ms |
5712 KB |
Time limit exceeded |
28 |
Execution timed out |
5039 ms |
4692 KB |
Time limit exceeded |
29 |
Execution timed out |
5035 ms |
4948 KB |
Time limit exceeded |
30 |
Execution timed out |
5055 ms |
5980 KB |
Time limit exceeded |
31 |
Execution timed out |
5048 ms |
5204 KB |
Time limit exceeded |
32 |
Execution timed out |
5045 ms |
5032 KB |
Time limit exceeded |
33 |
Execution timed out |
5022 ms |
5968 KB |
Time limit exceeded |
34 |
Execution timed out |
5040 ms |
4444 KB |
Time limit exceeded |
35 |
Execution timed out |
5034 ms |
5320 KB |
Time limit exceeded |
36 |
Execution timed out |
5075 ms |
4700 KB |
Time limit exceeded |
37 |
Execution timed out |
5085 ms |
3208 KB |
Time limit exceeded |
38 |
Execution timed out |
5020 ms |
3168 KB |
Time limit exceeded |
39 |
Execution timed out |
5038 ms |
3164 KB |
Time limit exceeded |
40 |
Execution timed out |
5058 ms |
2652 KB |
Time limit exceeded |
41 |
Execution timed out |
5041 ms |
3164 KB |
Time limit exceeded |
42 |
Execution timed out |
5025 ms |
2648 KB |
Time limit exceeded |
43 |
Execution timed out |
5031 ms |
3148 KB |
Time limit exceeded |
44 |
Execution timed out |
5075 ms |
3156 KB |
Time limit exceeded |
45 |
Execution timed out |
5050 ms |
3164 KB |
Time limit exceeded |
46 |
Execution timed out |
5052 ms |
3080 KB |
Time limit exceeded |
47 |
Execution timed out |
5084 ms |
2896 KB |
Time limit exceeded |
48 |
Execution timed out |
5061 ms |
3156 KB |
Time limit exceeded |
49 |
Execution timed out |
5040 ms |
2648 KB |
Time limit exceeded |
50 |
Execution timed out |
5038 ms |
3412 KB |
Time limit exceeded |
51 |
Execution timed out |
5035 ms |
3164 KB |
Time limit exceeded |
52 |
Execution timed out |
5010 ms |
3160 KB |
Time limit exceeded |
53 |
Execution timed out |
5061 ms |
3176 KB |
Time limit exceeded |
54 |
Execution timed out |
5050 ms |
2908 KB |
Time limit exceeded |
55 |
Execution timed out |
5028 ms |
3152 KB |
Time limit exceeded |
56 |
Execution timed out |
5077 ms |
3160 KB |
Time limit exceeded |
57 |
Execution timed out |
5058 ms |
3156 KB |
Time limit exceeded |
58 |
Execution timed out |
5008 ms |
3160 KB |
Time limit exceeded |
59 |
Execution timed out |
5055 ms |
3156 KB |
Time limit exceeded |
60 |
Execution timed out |
5039 ms |
3236 KB |
Time limit exceeded |
61 |
Execution timed out |
5040 ms |
3156 KB |
Time limit exceeded |
62 |
Execution timed out |
5052 ms |
3156 KB |
Time limit exceeded |
63 |
Execution timed out |
5020 ms |
3160 KB |
Time limit exceeded |
64 |
Execution timed out |
5051 ms |
3164 KB |
Time limit exceeded |
65 |
Execution timed out |
5061 ms |
2900 KB |
Time limit exceeded |
66 |
Execution timed out |
5049 ms |
2904 KB |
Time limit exceeded |
67 |
Execution timed out |
5064 ms |
2716 KB |
Time limit exceeded |
68 |
Execution timed out |
5063 ms |
3288 KB |
Time limit exceeded |
69 |
Execution timed out |
5067 ms |
2908 KB |
Time limit exceeded |
70 |
Execution timed out |
5017 ms |
3156 KB |
Time limit exceeded |
71 |
Execution timed out |
5061 ms |
3160 KB |
Time limit exceeded |
72 |
Execution timed out |
5101 ms |
2928 KB |
Time limit exceeded |
73 |
Execution timed out |
5048 ms |
3160 KB |
Time limit exceeded |
74 |
Execution timed out |
5021 ms |
3152 KB |
Time limit exceeded |
75 |
Execution timed out |
5015 ms |
3412 KB |
Time limit exceeded |
76 |
Execution timed out |
5018 ms |
3160 KB |
Time limit exceeded |
77 |
Execution timed out |
5035 ms |
3152 KB |
Time limit exceeded |
78 |
Execution timed out |
5055 ms |
3164 KB |
Time limit exceeded |
79 |
Execution timed out |
5044 ms |
3272 KB |
Time limit exceeded |
80 |
Execution timed out |
5061 ms |
3164 KB |
Time limit exceeded |
81 |
Execution timed out |
5014 ms |
2896 KB |
Time limit exceeded |
82 |
Execution timed out |
5072 ms |
3412 KB |
Time limit exceeded |
83 |
Execution timed out |
5041 ms |
3156 KB |
Time limit exceeded |
84 |
Execution timed out |
5025 ms |
3152 KB |
Time limit exceeded |
85 |
Execution timed out |
5040 ms |
3156 KB |
Time limit exceeded |
86 |
Execution timed out |
5046 ms |
2908 KB |
Time limit exceeded |
87 |
Execution timed out |
5024 ms |
3152 KB |
Time limit exceeded |
88 |
Execution timed out |
5022 ms |
3412 KB |
Time limit exceeded |
89 |
Execution timed out |
5060 ms |
3156 KB |
Time limit exceeded |
90 |
Execution timed out |
5059 ms |
2900 KB |
Time limit exceeded |
91 |
Execution timed out |
5035 ms |
2908 KB |
Time limit exceeded |
92 |
Execution timed out |
5016 ms |
3160 KB |
Time limit exceeded |
93 |
Execution timed out |
5035 ms |
2648 KB |
Time limit exceeded |
94 |
Execution timed out |
5059 ms |
3112 KB |
Time limit exceeded |
95 |
Execution timed out |
5044 ms |
3156 KB |
Time limit exceeded |
96 |
Execution timed out |
5067 ms |
3164 KB |
Time limit exceeded |
97 |
Execution timed out |
5051 ms |
3164 KB |
Time limit exceeded |
98 |
Execution timed out |
5034 ms |
3156 KB |
Time limit exceeded |
99 |
Execution timed out |
5055 ms |
3052 KB |
Time limit exceeded |
100 |
Execution timed out |
5018 ms |
2820 KB |
Time limit exceeded |
101 |
Execution timed out |
5033 ms |
3164 KB |
Time limit exceeded |
102 |
Execution timed out |
5064 ms |
3240 KB |
Time limit exceeded |