Submission #741957

# Submission time Handle Problem Language Result Execution time Memory
741957 2023-05-15T08:08:42 Z haydendoo Art Class (IOI13_artclass) C++17
0 / 100
62 ms 6404 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]) {
	int adjr=0,adjg=0,adjb=0;
	for(int i=0; i<h; ++i) {
		for(int j=0; j<w; ++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]); 
			} 
		} 
	} 
	long double contrast = ((long double) adjr+adjg+adjb) / ((long double) h*w);
	if(contrast<=30.0) return 4;
	assert(0);
	if(contrast>=130.0) return 3;
	assert(0);
	return 1;
} 
# Verdict Execution time Memory Grader output
1 Correct 31 ms 3156 KB Output is correct
2 Runtime error 42 ms 5340 KB Execution killed with signal 6
3 Correct 36 ms 3208 KB Output is correct
4 Runtime error 12 ms 1620 KB Execution killed with signal 6
5 Incorrect 49 ms 3212 KB Output isn't correct
6 Runtime error 43 ms 4956 KB Execution killed with signal 6
7 Runtime error 60 ms 6308 KB Execution killed with signal 6
8 Correct 42 ms 2808 KB Output is correct
9 Runtime error 42 ms 6328 KB Execution killed with signal 6
10 Correct 34 ms 3128 KB Output is correct
11 Runtime error 43 ms 5476 KB Execution killed with signal 6
12 Runtime error 46 ms 4928 KB Execution killed with signal 6
13 Correct 51 ms 3216 KB Output is correct
14 Correct 39 ms 3124 KB Output is correct
15 Runtime error 42 ms 4736 KB Execution killed with signal 6
16 Runtime error 38 ms 3500 KB Execution killed with signal 6
17 Runtime error 33 ms 4220 KB Execution killed with signal 6
18 Runtime error 26 ms 3440 KB Execution killed with signal 6
19 Runtime error 50 ms 6292 KB Execution killed with signal 6
20 Incorrect 43 ms 3176 KB Output isn't correct
21 Incorrect 51 ms 3148 KB Output isn't correct
22 Runtime error 32 ms 3968 KB Execution killed with signal 6
23 Runtime error 22 ms 3028 KB Execution killed with signal 6
24 Runtime error 43 ms 6404 KB Execution killed with signal 6
25 Runtime error 41 ms 6348 KB Execution killed with signal 6
26 Correct 40 ms 3200 KB Output is correct
27 Runtime error 52 ms 6348 KB Execution killed with signal 6
28 Incorrect 58 ms 2848 KB Output isn't correct
29 Runtime error 47 ms 6364 KB Execution killed with signal 6
30 Runtime error 37 ms 4724 KB Execution killed with signal 6
31 Runtime error 41 ms 6292 KB Execution killed with signal 6
32 Runtime error 43 ms 6292 KB Execution killed with signal 6
33 Correct 12 ms 3156 KB Output is correct
34 Correct 40 ms 3148 KB Output is correct
35 Correct 29 ms 3196 KB Output is correct
36 Runtime error 41 ms 4864 KB Execution killed with signal 6
37 Runtime error 48 ms 6284 KB Execution killed with signal 6
38 Runtime error 40 ms 5076 KB Execution killed with signal 6
39 Runtime error 53 ms 6292 KB Execution killed with signal 6
40 Runtime error 33 ms 4156 KB Execution killed with signal 6
41 Incorrect 50 ms 3192 KB Output isn't correct
42 Runtime error 39 ms 4812 KB Execution killed with signal 6
43 Incorrect 47 ms 3076 KB Output isn't correct
44 Correct 41 ms 3208 KB Output is correct
45 Correct 23 ms 3116 KB Output is correct
46 Runtime error 22 ms 2800 KB Execution killed with signal 6
47 Runtime error 34 ms 6348 KB Execution killed with signal 6
48 Runtime error 45 ms 5496 KB Execution killed with signal 6
49 Incorrect 47 ms 3120 KB Output isn't correct
50 Incorrect 39 ms 3128 KB Output isn't correct
51 Runtime error 32 ms 4304 KB Execution killed with signal 6
52 Runtime error 41 ms 5212 KB Execution killed with signal 6
53 Runtime error 49 ms 6356 KB Execution killed with signal 6
54 Runtime error 62 ms 6368 KB Execution killed with signal 6
55 Correct 44 ms 3148 KB Output is correct
56 Correct 47 ms 3180 KB Output is correct
57 Correct 50 ms 3164 KB Output is correct
58 Runtime error 35 ms 6320 KB Execution killed with signal 6
59 Runtime error 44 ms 5132 KB Execution killed with signal 6
60 Runtime error 41 ms 5272 KB Execution killed with signal 6
61 Correct 31 ms 3204 KB Output is correct
62 Correct 41 ms 3148 KB Output is correct
63 Runtime error 42 ms 5356 KB Execution killed with signal 6
64 Correct 30 ms 3180 KB Output is correct
65 Runtime error 29 ms 6376 KB Execution killed with signal 6
66 Runtime error 53 ms 6288 KB Execution killed with signal 6
67 Runtime error 32 ms 6272 KB Execution killed with signal 6
68 Runtime error 39 ms 4936 KB Execution killed with signal 6
69 Runtime error 26 ms 3424 KB Execution killed with signal 6
70 Runtime error 22 ms 2900 KB Execution killed with signal 6
71 Runtime error 41 ms 5192 KB Execution killed with signal 6
72 Correct 32 ms 3212 KB Output is correct
73 Correct 37 ms 3176 KB Output is correct
74 Incorrect 30 ms 3152 KB Output isn't correct
75 Incorrect 29 ms 1868 KB Output isn't correct
76 Runtime error 56 ms 6352 KB Execution killed with signal 6
77 Runtime error 39 ms 5108 KB Execution killed with signal 6
78 Runtime error 35 ms 6276 KB Execution killed with signal 6
79 Runtime error 41 ms 6396 KB Execution killed with signal 6
80 Runtime error 39 ms 4308 KB Execution killed with signal 6
81 Correct 39 ms 3148 KB Output is correct
82 Runtime error 37 ms 6312 KB Execution killed with signal 6
83 Runtime error 29 ms 3480 KB Execution killed with signal 6
84 Runtime error 44 ms 6344 KB Execution killed with signal 6
85 Correct 35 ms 2548 KB Output is correct
86 Correct 44 ms 3176 KB Output is correct
87 Correct 46 ms 2964 KB Output is correct
88 Runtime error 41 ms 6348 KB Execution killed with signal 6
89 Runtime error 41 ms 5344 KB Execution killed with signal 6
90 Runtime error 57 ms 5308 KB Execution killed with signal 6
91 Runtime error 45 ms 6332 KB Execution killed with signal 6
92 Incorrect 30 ms 3176 KB Output isn't correct
93 Correct 38 ms 3160 KB Output is correct
94 Runtime error 41 ms 5384 KB Execution killed with signal 6
95 Runtime error 41 ms 6264 KB Execution killed with signal 6
96 Runtime error 39 ms 5036 KB Execution killed with signal 6
97 Runtime error 40 ms 4820 KB Execution killed with signal 6
98 Runtime error 42 ms 5140 KB Execution killed with signal 6
99 Runtime error 45 ms 6344 KB Execution killed with signal 6
100 Runtime error 41 ms 5356 KB Execution killed with signal 6
101 Runtime error 42 ms 5484 KB Execution killed with signal 6
102 Runtime error 57 ms 6352 KB Execution killed with signal 6