답안 #741989

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
741989 2023-05-15T09:47:09 Z haydendoo 미술 수업 (IOI13_artclass) C++17
0 / 100
75 ms 6416 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!=0) {
				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!=0) {
				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]); 
			} 
		} 
	} 
	totalr/=(long double) h*w; totalg/=(long double) h*w; totalb/=(long double) h*w;
	if(sqrt((totalr*totalr) + (totalg*totalg) + (totalb*totalb))<=100.0) return 2; 
	assert(0);
	adjr/=(long double) h*w; adjg/=(long double) h*w; adjb/=(long double) h*w;
	if(adjr<=6.0 || adjg<=6.0 || adjb<=6.0) return 4;
	if(adjr>=37.0 || adjg>=37.0 || adjb>=37.0) return 3;
	assert(0);
	return 1;
} 
# 결과 실행 시간 메모리 Grader output
1 Runtime error 44 ms 6416 KB Execution killed with signal 6
2 Runtime error 43 ms 5512 KB Execution killed with signal 6
3 Runtime error 22 ms 2852 KB Execution killed with signal 6
4 Runtime error 41 ms 6352 KB Execution killed with signal 6
5 Runtime error 40 ms 5324 KB Execution killed with signal 6
6 Runtime error 26 ms 3448 KB Execution killed with signal 6
7 Runtime error 39 ms 6348 KB Execution killed with signal 6
8 Runtime error 44 ms 6332 KB Execution killed with signal 6
9 Runtime error 32 ms 4220 KB Execution killed with signal 6
10 Runtime error 40 ms 6376 KB Execution killed with signal 6
11 Runtime error 41 ms 5360 KB Execution killed with signal 6
12 Runtime error 42 ms 6348 KB Execution killed with signal 6
13 Runtime error 41 ms 6348 KB Execution killed with signal 6
14 Runtime error 42 ms 6276 KB Execution killed with signal 6
15 Runtime error 55 ms 6272 KB Execution killed with signal 6
16 Runtime error 42 ms 5652 KB Execution killed with signal 6
17 Runtime error 41 ms 6372 KB Execution killed with signal 6
18 Runtime error 48 ms 6280 KB Execution killed with signal 6
19 Runtime error 42 ms 6384 KB Execution killed with signal 6
20 Runtime error 33 ms 6272 KB Execution killed with signal 6
21 Runtime error 40 ms 6340 KB Execution killed with signal 6
22 Runtime error 42 ms 6332 KB Execution killed with signal 6
23 Runtime error 39 ms 6284 KB Execution killed with signal 6
24 Runtime error 31 ms 3980 KB Execution killed with signal 6
25 Runtime error 42 ms 6296 KB Execution killed with signal 6
26 Runtime error 48 ms 6396 KB Execution killed with signal 6
27 Runtime error 37 ms 5108 KB Execution killed with signal 6
28 Runtime error 28 ms 3408 KB Execution killed with signal 6
29 Runtime error 48 ms 6288 KB Execution killed with signal 6
30 Runtime error 40 ms 6264 KB Execution killed with signal 6
31 Runtime error 31 ms 4252 KB Execution killed with signal 6
32 Runtime error 42 ms 6324 KB Execution killed with signal 6
33 Runtime error 41 ms 5324 KB Execution killed with signal 6
34 Runtime error 29 ms 6304 KB Execution killed with signal 6
35 Runtime error 43 ms 5324 KB Execution killed with signal 6
36 Incorrect 12 ms 3224 KB Output isn't correct
37 Runtime error 58 ms 6288 KB Execution killed with signal 6
38 Runtime error 67 ms 6284 KB Execution killed with signal 6
39 Runtime error 11 ms 1568 KB Execution killed with signal 6
40 Runtime error 45 ms 5992 KB Execution killed with signal 6
41 Runtime error 50 ms 6304 KB Execution killed with signal 6
42 Runtime error 25 ms 3524 KB Execution killed with signal 6
43 Runtime error 38 ms 6356 KB Execution killed with signal 6
44 Runtime error 47 ms 6348 KB Execution killed with signal 6
45 Incorrect 35 ms 2644 KB Output isn't correct
46 Runtime error 33 ms 4148 KB Execution killed with signal 6
47 Runtime error 49 ms 6372 KB Execution killed with signal 6
48 Runtime error 28 ms 6336 KB Execution killed with signal 6
49 Runtime error 47 ms 6220 KB Execution killed with signal 6
50 Runtime error 39 ms 4968 KB Execution killed with signal 6
51 Runtime error 46 ms 5316 KB Execution killed with signal 6
52 Runtime error 40 ms 5348 KB Execution killed with signal 6
53 Runtime error 42 ms 4860 KB Execution killed with signal 6
54 Runtime error 33 ms 2964 KB Execution killed with signal 6
55 Runtime error 44 ms 6324 KB Execution killed with signal 6
56 Runtime error 42 ms 5472 KB Execution killed with signal 6
57 Runtime error 42 ms 5576 KB Execution killed with signal 6
58 Runtime error 42 ms 5484 KB Execution killed with signal 6
59 Runtime error 40 ms 6300 KB Execution killed with signal 6
60 Runtime error 32 ms 6328 KB Execution killed with signal 6
61 Runtime error 50 ms 6296 KB Execution killed with signal 6
62 Runtime error 41 ms 6332 KB Execution killed with signal 6
63 Runtime error 38 ms 4832 KB Execution killed with signal 6
64 Runtime error 43 ms 6348 KB Execution killed with signal 6
65 Runtime error 33 ms 6348 KB Execution killed with signal 6
66 Runtime error 36 ms 6284 KB Execution killed with signal 6
67 Runtime error 39 ms 6392 KB Execution killed with signal 6
68 Runtime error 39 ms 5200 KB Execution killed with signal 6
69 Runtime error 32 ms 6348 KB Execution killed with signal 6
70 Runtime error 36 ms 4824 KB Execution killed with signal 6
71 Runtime error 37 ms 6352 KB Execution killed with signal 6
72 Runtime error 46 ms 5200 KB Execution killed with signal 6
73 Runtime error 41 ms 5156 KB Execution killed with signal 6
74 Runtime error 33 ms 6348 KB Execution killed with signal 6
75 Runtime error 21 ms 2892 KB Execution killed with signal 6
76 Runtime error 37 ms 4764 KB Execution killed with signal 6
77 Runtime error 40 ms 6292 KB Execution killed with signal 6
78 Runtime error 38 ms 4940 KB Execution killed with signal 6
79 Runtime error 43 ms 4916 KB Execution killed with signal 6
80 Runtime error 57 ms 5196 KB Execution killed with signal 6
81 Runtime error 29 ms 3512 KB Execution killed with signal 6
82 Runtime error 48 ms 6296 KB Execution killed with signal 6
83 Runtime error 46 ms 6340 KB Execution killed with signal 6
84 Runtime error 34 ms 6376 KB Execution killed with signal 6
85 Runtime error 33 ms 4344 KB Execution killed with signal 6
86 Runtime error 54 ms 6364 KB Execution killed with signal 6
87 Runtime error 44 ms 6288 KB Execution killed with signal 6
88 Runtime error 56 ms 5432 KB Execution killed with signal 6
89 Runtime error 75 ms 6296 KB Execution killed with signal 6
90 Runtime error 48 ms 6364 KB Execution killed with signal 6
91 Runtime error 42 ms 6284 KB Execution killed with signal 6
92 Runtime error 49 ms 6292 KB Execution killed with signal 6
93 Runtime error 43 ms 5056 KB Execution killed with signal 6
94 Runtime error 37 ms 5004 KB Execution killed with signal 6
95 Runtime error 36 ms 4928 KB Execution killed with signal 6
96 Runtime error 32 ms 6348 KB Execution killed with signal 6
97 Runtime error 38 ms 6364 KB Execution killed with signal 6
98 Runtime error 40 ms 6356 KB Execution killed with signal 6
99 Runtime error 31 ms 6356 KB Execution killed with signal 6
100 Runtime error 40 ms 6364 KB Execution killed with signal 6
101 Runtime error 27 ms 3668 KB Execution killed with signal 6
102 Runtime error 26 ms 6388 KB Execution killed with signal 6