#include "artclass.h"
#include<bits/stdc++.h>
using namespace std;
int style(int H,int W,
int R[500][500],int G[500][500],int B[500][500]){
double all = 0;
double ma = 0 , xd = 0;
for(int i = 0;i<H;i++){
ma+=G[i][0];
for(int j = 1;j<W;j++){
xd ++;
all+=abs(R[i][j]-R[i][j-1]);
all+=abs(G[i][j]-G[i][j-1]);
ma+=G[i][j];
all+=abs(B[i][j]-B[i][j-1]);
}
}
for(int i = 1;i<H;i++){
for(int j = 0;j<W;j++){
all+=abs(R[i-1][j]-R[i][j]);
all+=abs(G[i-1][j]-G[i][j]);
all+=abs(B[i-1][j]-B[i][j]);
}
}
ma/=double(H*W);
all/=double(xd);
if(ma>=200)return 2;
if(all<=9)return 4;
if(all<=24)return 1;
return 3;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
38 ms |
3404 KB |
Output isn't correct |
2 |
Incorrect |
42 ms |
3428 KB |
Output isn't correct |
3 |
Incorrect |
44 ms |
3456 KB |
Output isn't correct |
4 |
Incorrect |
46 ms |
3388 KB |
Output isn't correct |
5 |
Incorrect |
31 ms |
3456 KB |
Output isn't correct |
6 |
Correct |
36 ms |
3468 KB |
Output is correct |
7 |
Incorrect |
36 ms |
3388 KB |
Output isn't correct |
8 |
Incorrect |
34 ms |
2816 KB |
Output isn't correct |
9 |
Incorrect |
42 ms |
3428 KB |
Output isn't correct |
10 |
Incorrect |
25 ms |
2096 KB |
Output isn't correct |
11 |
Correct |
32 ms |
3472 KB |
Output is correct |
12 |
Incorrect |
39 ms |
3448 KB |
Output isn't correct |
13 |
Correct |
36 ms |
2896 KB |
Output is correct |
14 |
Correct |
33 ms |
2632 KB |
Output is correct |
15 |
Incorrect |
25 ms |
3556 KB |
Output isn't correct |
16 |
Incorrect |
35 ms |
2840 KB |
Output isn't correct |
17 |
Incorrect |
23 ms |
1996 KB |
Output isn't correct |
18 |
Correct |
39 ms |
3476 KB |
Output is correct |
19 |
Incorrect |
39 ms |
3364 KB |
Output isn't correct |
20 |
Correct |
30 ms |
2408 KB |
Output is correct |
21 |
Incorrect |
36 ms |
3368 KB |
Output isn't correct |
22 |
Incorrect |
40 ms |
3592 KB |
Output isn't correct |
23 |
Incorrect |
39 ms |
3048 KB |
Output isn't correct |
24 |
Incorrect |
36 ms |
3448 KB |
Output isn't correct |
25 |
Incorrect |
30 ms |
3360 KB |
Output isn't correct |
26 |
Incorrect |
42 ms |
2984 KB |
Output isn't correct |
27 |
Incorrect |
41 ms |
3116 KB |
Output isn't correct |
28 |
Correct |
27 ms |
3404 KB |
Output is correct |
29 |
Incorrect |
43 ms |
3368 KB |
Output isn't correct |
30 |
Correct |
9 ms |
852 KB |
Output is correct |
31 |
Incorrect |
45 ms |
3456 KB |
Output isn't correct |
32 |
Incorrect |
42 ms |
3020 KB |
Output isn't correct |
33 |
Correct |
34 ms |
3396 KB |
Output is correct |
34 |
Correct |
45 ms |
3420 KB |
Output is correct |
35 |
Incorrect |
33 ms |
2676 KB |
Output isn't correct |
36 |
Correct |
36 ms |
2956 KB |
Output is correct |
37 |
Incorrect |
44 ms |
3404 KB |
Output isn't correct |
38 |
Incorrect |
36 ms |
3384 KB |
Output isn't correct |
39 |
Incorrect |
32 ms |
2764 KB |
Output isn't correct |
40 |
Incorrect |
34 ms |
2764 KB |
Output isn't correct |
41 |
Incorrect |
35 ms |
3480 KB |
Output isn't correct |
42 |
Correct |
28 ms |
2228 KB |
Output is correct |
43 |
Correct |
28 ms |
2296 KB |
Output is correct |
44 |
Incorrect |
30 ms |
3404 KB |
Output isn't correct |
45 |
Correct |
28 ms |
3380 KB |
Output is correct |
46 |
Correct |
33 ms |
2624 KB |
Output is correct |
47 |
Incorrect |
36 ms |
3352 KB |
Output isn't correct |
48 |
Correct |
30 ms |
3420 KB |
Output is correct |
49 |
Incorrect |
35 ms |
3416 KB |
Output isn't correct |
50 |
Incorrect |
38 ms |
3020 KB |
Output isn't correct |
51 |
Incorrect |
11 ms |
3208 KB |
Output isn't correct |
52 |
Incorrect |
35 ms |
3472 KB |
Output isn't correct |
53 |
Incorrect |
29 ms |
2372 KB |
Output isn't correct |
54 |
Correct |
23 ms |
2004 KB |
Output is correct |
55 |
Correct |
43 ms |
3420 KB |
Output is correct |
56 |
Correct |
18 ms |
1492 KB |
Output is correct |
57 |
Incorrect |
45 ms |
3468 KB |
Output isn't correct |
58 |
Incorrect |
35 ms |
3352 KB |
Output isn't correct |
59 |
Incorrect |
40 ms |
3304 KB |
Output isn't correct |
60 |
Correct |
35 ms |
2748 KB |
Output is correct |
61 |
Incorrect |
36 ms |
2712 KB |
Output isn't correct |
62 |
Incorrect |
28 ms |
3416 KB |
Output isn't correct |
63 |
Correct |
38 ms |
2920 KB |
Output is correct |
64 |
Correct |
36 ms |
2636 KB |
Output is correct |
65 |
Incorrect |
37 ms |
3408 KB |
Output isn't correct |
66 |
Incorrect |
36 ms |
2864 KB |
Output isn't correct |
67 |
Correct |
44 ms |
3472 KB |
Output is correct |
68 |
Correct |
23 ms |
1996 KB |
Output is correct |
69 |
Incorrect |
26 ms |
3536 KB |
Output isn't correct |
70 |
Incorrect |
33 ms |
2712 KB |
Output isn't correct |
71 |
Correct |
33 ms |
2316 KB |
Output is correct |
72 |
Incorrect |
34 ms |
2728 KB |
Output isn't correct |
73 |
Correct |
29 ms |
3388 KB |
Output is correct |
74 |
Correct |
20 ms |
1728 KB |
Output is correct |
75 |
Incorrect |
36 ms |
2888 KB |
Output isn't correct |
76 |
Correct |
33 ms |
3432 KB |
Output is correct |
77 |
Incorrect |
47 ms |
3444 KB |
Output isn't correct |
78 |
Correct |
47 ms |
3536 KB |
Output is correct |
79 |
Incorrect |
43 ms |
3404 KB |
Output isn't correct |
80 |
Correct |
34 ms |
3460 KB |
Output is correct |
81 |
Incorrect |
28 ms |
3460 KB |
Output isn't correct |
82 |
Correct |
35 ms |
3404 KB |
Output is correct |
83 |
Incorrect |
45 ms |
3396 KB |
Output isn't correct |
84 |
Incorrect |
35 ms |
2892 KB |
Output isn't correct |
85 |
Correct |
36 ms |
3360 KB |
Output is correct |
86 |
Correct |
58 ms |
3444 KB |
Output is correct |
87 |
Incorrect |
36 ms |
3404 KB |
Output isn't correct |
88 |
Incorrect |
43 ms |
3416 KB |
Output isn't correct |
89 |
Correct |
32 ms |
3448 KB |
Output is correct |
90 |
Correct |
23 ms |
1952 KB |
Output is correct |
91 |
Correct |
37 ms |
3412 KB |
Output is correct |
92 |
Incorrect |
33 ms |
2736 KB |
Output isn't correct |
93 |
Correct |
37 ms |
3408 KB |
Output is correct |
94 |
Incorrect |
29 ms |
3412 KB |
Output isn't correct |
95 |
Incorrect |
37 ms |
2980 KB |
Output isn't correct |
96 |
Correct |
38 ms |
3404 KB |
Output is correct |
97 |
Correct |
35 ms |
2804 KB |
Output is correct |
98 |
Correct |
22 ms |
1492 KB |
Output is correct |
99 |
Incorrect |
41 ms |
3060 KB |
Output isn't correct |
100 |
Incorrect |
28 ms |
3444 KB |
Output isn't correct |
101 |
Incorrect |
35 ms |
2764 KB |
Output isn't correct |
102 |
Incorrect |
43 ms |
3352 KB |
Output isn't correct |