Submission #741971

# Submission time Handle Problem Language Result Execution time Memory
741971 2023-05-15T09:09:10 Z haydendoo Art Class (IOI13_artclass) C++17
0 / 100
65 ms 6392 KB
#include <bits/stdc++.h>
#include "artclass.h"
using namespace std;

int style(int h, int w, int r[500][500], int g[500][500], int b[500][500]) {
	long double adjr=0,adjg=0,adjb=0;
	long double totalr=0,totalg=0,totalb=0;
	for(int i=0; i<h; ++i) {
		for(int j=0; j<w; ++j) {
			totalr+=r[i][j]; totalg+=g[i][j]; totalb+=b[i][j];
			if(i) {
				adjr+=abs(r[i][j]-r[i-1][j]);
				adjg+=abs(g[i][j]-g[i-1][j]);
				adjb+=abs(b[i][j]-b[i-1][j]);
			}
			if(j) {
				adjr+=abs(r[i][j]-r[i][j-1]);
				adjg+=abs(g[i][j]-g[i][j-1]);
				adjb+=abs(b[i][j]-b[i][j-1]); 
			} 
		} 
	} 
	adjr/=h*w; adjg/=h*w; adjb/=h*w;
	if(adjr<=6.0 || adjg<=6.0 || adjb<=6.0) return 4;
	assert(0);
	if(sqrt((totalr*totalr) + (totalg*totalg) + (totalb*totalb))<=100.0) return 2;
	return 1;
} 
# Verdict Execution time Memory Grader output
1 Runtime error 42 ms 6348 KB Execution killed with signal 6
2 Correct 38 ms 3140 KB Output is correct
3 Runtime error 27 ms 3668 KB Execution killed with signal 6
4 Runtime error 41 ms 5324 KB Execution killed with signal 6
5 Runtime error 41 ms 6388 KB Execution killed with signal 6
6 Correct 57 ms 3096 KB Output is correct
7 Correct 33 ms 3212 KB Output is correct
8 Runtime error 40 ms 5068 KB Execution killed with signal 6
9 Runtime error 42 ms 5372 KB Execution killed with signal 6
10 Runtime error 48 ms 6344 KB Execution killed with signal 6
11 Runtime error 40 ms 6292 KB Execution killed with signal 6
12 Runtime error 42 ms 6296 KB Execution killed with signal 6
13 Correct 42 ms 3164 KB Output is correct
14 Runtime error 52 ms 6312 KB Execution killed with signal 6
15 Runtime error 32 ms 6356 KB Execution killed with signal 6
16 Runtime error 39 ms 4784 KB Execution killed with signal 6
17 Runtime error 40 ms 4812 KB Execution killed with signal 6
18 Correct 28 ms 3156 KB Output is correct
19 Runtime error 37 ms 4812 KB Execution killed with signal 6
20 Runtime error 33 ms 6348 KB Execution killed with signal 6
21 Correct 49 ms 3264 KB Output is correct
22 Runtime error 32 ms 4308 KB Execution killed with signal 6
23 Runtime error 41 ms 6316 KB Execution killed with signal 6
24 Runtime error 31 ms 4100 KB Execution killed with signal 6
25 Runtime error 39 ms 6356 KB Execution killed with signal 6
26 Runtime error 43 ms 6348 KB Execution killed with signal 6
27 Runtime error 59 ms 5484 KB Execution killed with signal 6
28 Runtime error 46 ms 5380 KB Execution killed with signal 6
29 Runtime error 36 ms 6300 KB Execution killed with signal 6
30 Runtime error 39 ms 4900 KB Execution killed with signal 6
31 Correct 40 ms 3148 KB Output is correct
32 Runtime error 42 ms 6388 KB Execution killed with signal 6
33 Runtime error 41 ms 5060 KB Execution killed with signal 6
34 Runtime error 26 ms 3412 KB Execution killed with signal 6
35 Runtime error 45 ms 6352 KB Execution killed with signal 6
36 Correct 37 ms 2548 KB Output is correct
37 Runtime error 38 ms 5112 KB Execution killed with signal 6
38 Runtime error 47 ms 6288 KB Execution killed with signal 6
39 Runtime error 45 ms 5256 KB Execution killed with signal 6
40 Correct 30 ms 3216 KB Output is correct
41 Runtime error 40 ms 5172 KB Execution killed with signal 6
42 Runtime error 46 ms 6356 KB Execution killed with signal 6
43 Runtime error 42 ms 5200 KB Execution killed with signal 6
44 Runtime error 49 ms 6248 KB Execution killed with signal 6
45 Runtime error 39 ms 4976 KB Execution killed with signal 6
46 Runtime error 41 ms 6276 KB Execution killed with signal 6
47 Correct 26 ms 3164 KB Output is correct
48 Runtime error 40 ms 5196 KB Execution killed with signal 6
49 Runtime error 52 ms 6336 KB Execution killed with signal 6
50 Correct 45 ms 3064 KB Output is correct
51 Runtime error 39 ms 5068 KB Execution killed with signal 6
52 Runtime error 32 ms 4180 KB Execution killed with signal 6
53 Correct 32 ms 3148 KB Output is correct
54 Runtime error 22 ms 2772 KB Execution killed with signal 6
55 Runtime error 49 ms 6320 KB Execution killed with signal 6
56 Correct 38 ms 3220 KB Output is correct
57 Runtime error 41 ms 4816 KB Execution killed with signal 6
58 Runtime error 65 ms 6348 KB Execution killed with signal 6
59 Runtime error 50 ms 6280 KB Execution killed with signal 6
60 Runtime error 26 ms 3444 KB Execution killed with signal 6
61 Runtime error 21 ms 2856 KB Execution killed with signal 6
62 Runtime error 26 ms 3464 KB Execution killed with signal 6
63 Correct 40 ms 3168 KB Output is correct
64 Runtime error 47 ms 5396 KB Execution killed with signal 6
65 Runtime error 22 ms 3016 KB Execution killed with signal 6
66 Runtime error 49 ms 6300 KB Execution killed with signal 6
67 Runtime error 11 ms 1620 KB Execution killed with signal 6
68 Runtime error 44 ms 6316 KB Execution killed with signal 6
69 Correct 32 ms 3160 KB Output is correct
70 Runtime error 28 ms 3540 KB Execution killed with signal 6
71 Runtime error 42 ms 5300 KB Execution killed with signal 6
72 Runtime error 52 ms 6348 KB Execution killed with signal 6
73 Runtime error 41 ms 5348 KB Execution killed with signal 6
74 Correct 37 ms 3144 KB Output is correct
75 Runtime error 51 ms 6220 KB Execution killed with signal 6
76 Correct 31 ms 3196 KB Output is correct
77 Runtime error 51 ms 6308 KB Execution killed with signal 6
78 Correct 12 ms 3200 KB Output is correct
79 Runtime error 60 ms 5612 KB Execution killed with signal 6
80 Runtime error 34 ms 6340 KB Execution killed with signal 6
81 Runtime error 51 ms 6348 KB Execution killed with signal 6
82 Runtime error 49 ms 6332 KB Execution killed with signal 6
83 Correct 37 ms 3200 KB Output is correct
84 Runtime error 33 ms 4300 KB Execution killed with signal 6
85 Correct 40 ms 3184 KB Output is correct
86 Correct 43 ms 3148 KB Output is correct
87 Runtime error 34 ms 6392 KB Execution killed with signal 6
88 Runtime error 45 ms 5444 KB Execution killed with signal 6
89 Runtime error 43 ms 5636 KB Execution killed with signal 6
90 Correct 31 ms 3176 KB Output is correct
91 Runtime error 36 ms 6380 KB Execution killed with signal 6
92 Runtime error 42 ms 6388 KB Execution killed with signal 6
93 Runtime error 38 ms 4948 KB Execution killed with signal 6
94 Correct 41 ms 3156 KB Output is correct
95 Correct 53 ms 3180 KB Output is correct
96 Runtime error 41 ms 5364 KB Execution killed with signal 6
97 Runtime error 39 ms 6268 KB Execution killed with signal 6
98 Runtime error 49 ms 6364 KB Execution killed with signal 6
99 Runtime error 29 ms 6300 KB Execution killed with signal 6
100 Runtime error 31 ms 4004 KB Execution killed with signal 6
101 Runtime error 41 ms 6348 KB Execution killed with signal 6
102 Runtime error 44 ms 4936 KB Execution killed with signal 6