제출 #741926

#제출 시각아이디문제언어결과실행 시간메모리
741926haydendoo미술 수업 (IOI13_artclass)C++17
0 / 100
56 ms3280 KiB
#include <bits/stdc++.h>
#include "artclass.h"
using namespace std;

const int dx[4]={-1,0,1,0}, dy[4]={0,1,0,-1};

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;
    int style2=0;
    for(int i=0; i<h; ++i) {
        for(int j=0; j<w; ++j) {
            int R=r[i][j], G=g[i][j], B=b[i][j];
            if(G>=R && G>=B) ++style2;
            else if(max(R,G)-B>=40 && abs(R-G)<=50) ++style2;
        }
    }
    if(style2>=30000) return 2;
    return 7;
}

컴파일 시 표준 에러 (stderr) 메시지

artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:8:9: warning: unused variable 'adjr' [-Wunused-variable]
    8 |     int adjr=0,adjg=0,adjb=0;
      |         ^~~~
artclass.cpp:8:16: warning: unused variable 'adjg' [-Wunused-variable]
    8 |     int adjr=0,adjg=0,adjb=0;
      |                ^~~~
artclass.cpp:8:23: warning: unused variable 'adjb' [-Wunused-variable]
    8 |     int adjr=0,adjg=0,adjb=0;
      |                       ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...