Submission #741976

# Submission time Handle Problem Language Result Execution time Memory
741976 2023-05-15T09:15:25 Z haydendoo Art Class (IOI13_artclass) C++17
0 / 100
54 ms 6400 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/=(long double) h*w; adjg/=(long double) h*w; adjb/=(long double) h*w;
	if(adjr<=7.0 || adjg<=7.0 || adjb<=7.0) return 4;
	assert(0);
	if(adjr>=35.0 || adjg>=35.0 || adjb>=35.0) return 3;
	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 6332 KB Execution killed with signal 6
2 Runtime error 44 ms 5324 KB Execution killed with signal 6
3 Correct 29 ms 3148 KB Output is correct
4 Runtime error 43 ms 6320 KB Execution killed with signal 6
5 Correct 45 ms 2968 KB Output is correct
6 Incorrect 40 ms 3144 KB Output isn't correct
7 Runtime error 41 ms 6308 KB Execution killed with signal 6
8 Runtime error 49 ms 6352 KB Execution killed with signal 6
9 Correct 40 ms 3188 KB Output is correct
10 Runtime error 22 ms 2764 KB Execution killed with signal 6
11 Runtime error 41 ms 5084 KB Execution killed with signal 6
12 Runtime error 51 ms 6308 KB Execution killed with signal 6
13 Runtime error 44 ms 5452 KB Execution killed with signal 6
14 Runtime error 44 ms 6348 KB Execution killed with signal 6
15 Runtime error 27 ms 3464 KB Execution killed with signal 6
16 Correct 40 ms 3164 KB Output is correct
17 Correct 30 ms 3148 KB Output is correct
18 Runtime error 37 ms 4748 KB Execution killed with signal 6
19 Runtime error 49 ms 6320 KB Execution killed with signal 6
20 Runtime error 28 ms 3532 KB Execution killed with signal 6
21 Runtime error 39 ms 5068 KB Execution killed with signal 6
22 Correct 24 ms 3212 KB Output is correct
23 Runtime error 38 ms 4960 KB Execution killed with signal 6
24 Runtime error 32 ms 4268 KB Execution killed with signal 6
25 Runtime error 46 ms 5180 KB Execution killed with signal 6
26 Runtime error 32 ms 4052 KB Execution killed with signal 6
27 Runtime error 41 ms 5240 KB Execution killed with signal 6
28 Runtime error 35 ms 4140 KB Execution killed with signal 6
29 Runtime error 39 ms 6284 KB Execution killed with signal 6
30 Runtime error 27 ms 3632 KB Execution killed with signal 6
31 Correct 42 ms 3128 KB Output is correct
32 Correct 12 ms 3216 KB Output is correct
33 Runtime error 43 ms 6280 KB Execution killed with signal 6
34 Runtime error 48 ms 6344 KB Execution killed with signal 6
35 Correct 54 ms 3112 KB Output is correct
36 Runtime error 42 ms 5396 KB Execution killed with signal 6
37 Correct 43 ms 3120 KB Output is correct
38 Runtime error 38 ms 4816 KB Execution killed with signal 6
39 Runtime error 22 ms 2784 KB Execution killed with signal 6
40 Correct 48 ms 3368 KB Output is correct
41 Runtime error 51 ms 6348 KB Execution killed with signal 6
42 Runtime error 45 ms 6388 KB Execution killed with signal 6
43 Runtime error 50 ms 6300 KB Execution killed with signal 6
44 Runtime error 44 ms 5424 KB Execution killed with signal 6
45 Runtime error 46 ms 6348 KB Execution killed with signal 6
46 Runtime error 32 ms 6380 KB Execution killed with signal 6
47 Runtime error 44 ms 6400 KB Execution killed with signal 6
48 Runtime error 47 ms 6356 KB Execution killed with signal 6
49 Runtime error 43 ms 6272 KB Execution killed with signal 6
50 Correct 43 ms 3096 KB Output is correct
51 Runtime error 41 ms 4944 KB Execution killed with signal 6
52 Correct 43 ms 3148 KB Output is correct
53 Correct 34 ms 3224 KB Output is correct
54 Runtime error 40 ms 5020 KB Execution killed with signal 6
55 Correct 37 ms 2560 KB Output is correct
56 Correct 32 ms 3136 KB Output is correct
57 Correct 38 ms 3212 KB Output is correct
58 Runtime error 44 ms 6340 KB Execution killed with signal 6
59 Runtime error 32 ms 4128 KB Execution killed with signal 6
60 Incorrect 47 ms 3212 KB Output isn't correct
61 Runtime error 37 ms 4800 KB Execution killed with signal 6
62 Runtime error 26 ms 3540 KB Execution killed with signal 6
63 Runtime error 39 ms 4960 KB Execution killed with signal 6
64 Runtime error 37 ms 4812 KB Execution killed with signal 6
65 Runtime error 52 ms 6312 KB Execution killed with signal 6
66 Correct 32 ms 3148 KB Output is correct
67 Runtime error 51 ms 6332 KB Execution killed with signal 6
68 Runtime error 42 ms 5080 KB Execution killed with signal 6
69 Runtime error 32 ms 6376 KB Execution killed with signal 6
70 Correct 39 ms 3112 KB Output is correct
71 Runtime error 53 ms 6284 KB Execution killed with signal 6
72 Correct 43 ms 3168 KB Output is correct
73 Incorrect 46 ms 3112 KB Output isn't correct
74 Runtime error 43 ms 5124 KB Execution killed with signal 6
75 Runtime error 33 ms 6300 KB Execution killed with signal 6
76 Runtime error 39 ms 4348 KB Execution killed with signal 6
77 Correct 39 ms 3108 KB Output is correct
78 Runtime error 49 ms 6220 KB Execution killed with signal 6
79 Runtime error 41 ms 5184 KB Execution killed with signal 6
80 Runtime error 48 ms 6316 KB Execution killed with signal 6
81 Runtime error 37 ms 6352 KB Execution killed with signal 6
82 Runtime error 35 ms 6272 KB Execution killed with signal 6
83 Runtime error 11 ms 1604 KB Execution killed with signal 6
84 Runtime error 26 ms 3480 KB Execution killed with signal 6
85 Correct 38 ms 3188 KB Output is correct
86 Runtime error 33 ms 6308 KB Execution killed with signal 6
87 Runtime error 43 ms 5452 KB Execution killed with signal 6
88 Runtime error 42 ms 6272 KB Execution killed with signal 6
89 Runtime error 22 ms 2992 KB Execution killed with signal 6
90 Correct 42 ms 2764 KB Output is correct
91 Runtime error 41 ms 5368 KB Execution killed with signal 6
92 Correct 28 ms 3112 KB Output is correct
93 Runtime error 43 ms 5688 KB Execution killed with signal 6
94 Correct 32 ms 3216 KB Output is correct
95 Runtime error 33 ms 6348 KB Execution killed with signal 6
96 Runtime error 42 ms 5380 KB Execution killed with signal 6
97 Runtime error 42 ms 6348 KB Execution killed with signal 6
98 Runtime error 44 ms 6368 KB Execution killed with signal 6
99 Runtime error 42 ms 5376 KB Execution killed with signal 6
100 Runtime error 42 ms 5312 KB Execution killed with signal 6
101 Runtime error 36 ms 6284 KB Execution killed with signal 6
102 Runtime error 39 ms 5064 KB Execution killed with signal 6