답안 #768009

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
768009 2023-06-27T11:08:34 Z Ahmed57 미술 수업 (IOI13_artclass) C++17
3 / 100
54 ms 3564 KB
#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<=18)return 1;
    if(all>=25)return 3;
}

Compilation message

artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:32:1: warning: control reaches end of non-void function [-Wreturn-type]
   32 | }
      | ^
# 결과 실행 시간 메모리 Grader output
1 Incorrect 40 ms 3100 KB Output isn't correct
2 Correct 35 ms 3308 KB Output is correct
3 Incorrect 22 ms 1840 KB Output isn't correct
4 Incorrect 35 ms 3284 KB Output isn't correct
5 Incorrect 43 ms 3312 KB Output isn't correct
6 Incorrect 34 ms 2636 KB Output isn't correct
7 Incorrect 15 ms 3148 KB Output isn't correct
8 Incorrect 36 ms 3424 KB Output isn't correct
9 Correct 31 ms 3272 KB Output is correct
10 Incorrect 37 ms 2860 KB Output isn't correct
11 Incorrect 25 ms 3276 KB Output isn't correct
12 Incorrect 25 ms 3264 KB Output isn't correct
13 Correct 23 ms 1880 KB Output is correct
14 Incorrect 35 ms 2816 KB Output isn't correct
15 Incorrect 38 ms 3564 KB Output isn't correct
16 Incorrect 39 ms 2952 KB Output isn't correct
17 Incorrect 34 ms 3308 KB Output isn't correct
18 Incorrect 42 ms 3276 KB Output isn't correct
19 Incorrect 28 ms 3344 KB Output isn't correct
20 Correct 35 ms 3268 KB Output is correct
21 Incorrect 35 ms 3296 KB Output isn't correct
22 Correct 28 ms 2196 KB Output is correct
23 Incorrect 35 ms 2780 KB Output isn't correct
24 Incorrect 39 ms 2780 KB Output isn't correct
25 Correct 34 ms 3264 KB Output is correct
26 Incorrect 38 ms 2964 KB Output isn't correct
27 Incorrect 44 ms 3276 KB Output isn't correct
28 Correct 37 ms 3300 KB Output is correct
29 Incorrect 44 ms 3244 KB Output isn't correct
30 Incorrect 34 ms 3276 KB Output isn't correct
31 Correct 37 ms 3232 KB Output is correct
32 Incorrect 45 ms 3248 KB Output isn't correct
33 Incorrect 35 ms 3264 KB Output isn't correct
34 Correct 27 ms 2132 KB Output is correct
35 Correct 34 ms 2776 KB Output is correct
36 Incorrect 43 ms 3312 KB Output isn't correct
37 Correct 43 ms 2764 KB Output is correct
38 Correct 29 ms 2140 KB Output is correct
39 Incorrect 39 ms 2700 KB Output isn't correct
40 Incorrect 35 ms 3284 KB Output isn't correct
41 Incorrect 29 ms 3256 KB Output isn't correct
42 Incorrect 44 ms 3316 KB Output isn't correct
43 Incorrect 43 ms 3276 KB Output isn't correct
44 Incorrect 25 ms 1928 KB Output isn't correct
45 Correct 33 ms 2448 KB Output is correct
46 Incorrect 41 ms 3348 KB Output isn't correct
47 Incorrect 36 ms 2928 KB Output isn't correct
48 Correct 23 ms 1868 KB Output is correct
49 Correct 18 ms 1540 KB Output is correct
50 Incorrect 28 ms 2324 KB Output isn't correct
51 Incorrect 54 ms 3304 KB Output isn't correct
52 Correct 27 ms 3240 KB Output is correct
53 Correct 37 ms 3264 KB Output is correct
54 Incorrect 32 ms 2520 KB Output isn't correct
55 Incorrect 43 ms 3336 KB Output isn't correct
56 Correct 29 ms 3240 KB Output is correct
57 Correct 32 ms 3276 KB Output is correct
58 Incorrect 50 ms 3348 KB Output isn't correct
59 Incorrect 27 ms 3300 KB Output isn't correct
60 Correct 36 ms 2748 KB Output is correct
61 Incorrect 38 ms 3276 KB Output isn't correct
62 Incorrect 35 ms 3276 KB Output isn't correct
63 Correct 30 ms 2260 KB Output is correct
64 Incorrect 40 ms 3320 KB Output isn't correct
65 Incorrect 34 ms 3312 KB Output isn't correct
66 Incorrect 27 ms 3316 KB Output isn't correct
67 Correct 33 ms 2624 KB Output is correct
68 Incorrect 43 ms 3240 KB Output isn't correct
69 Incorrect 29 ms 3320 KB Output isn't correct
70 Incorrect 30 ms 3268 KB Output isn't correct
71 Correct 38 ms 3260 KB Output is correct
72 Incorrect 38 ms 2628 KB Output isn't correct
73 Incorrect 32 ms 2636 KB Output isn't correct
74 Incorrect 27 ms 3296 KB Output isn't correct
75 Incorrect 32 ms 2516 KB Output isn't correct
76 Correct 33 ms 2516 KB Output is correct
77 Correct 37 ms 3284 KB Output is correct
78 Correct 23 ms 1484 KB Output is correct
79 Incorrect 41 ms 3300 KB Output isn't correct
80 Incorrect 34 ms 2764 KB Output isn't correct
81 Incorrect 38 ms 3456 KB Output isn't correct
82 Incorrect 22 ms 3248 KB Output isn't correct
83 Correct 37 ms 2900 KB Output is correct
84 Incorrect 43 ms 3216 KB Output isn't correct
85 Correct 35 ms 2612 KB Output is correct
86 Incorrect 44 ms 3260 KB Output isn't correct
87 Correct 9 ms 852 KB Output is correct
88 Correct 20 ms 1620 KB Output is correct
89 Incorrect 33 ms 2632 KB Output isn't correct
90 Incorrect 44 ms 2980 KB Output isn't correct
91 Correct 33 ms 3248 KB Output is correct
92 Incorrect 34 ms 2748 KB Output isn't correct
93 Incorrect 33 ms 3344 KB Output isn't correct
94 Incorrect 33 ms 2592 KB Output isn't correct
95 Incorrect 37 ms 3276 KB Output isn't correct
96 Incorrect 38 ms 3280 KB Output isn't correct
97 Correct 39 ms 3224 KB Output is correct
98 Correct 31 ms 3348 KB Output is correct
99 Incorrect 34 ms 2684 KB Output isn't correct
100 Incorrect 37 ms 2748 KB Output isn't correct
101 Incorrect 50 ms 3292 KB Output isn't correct
102 Correct 23 ms 1868 KB Output is correct