제출 #1027119

#제출 시각아이디문제언어결과실행 시간메모리
1027119vjudge1미술 수업 (IOI13_artclass)C++17
6 / 100
40 ms3412 KiB
#include "artclass.h" #include<bits/stdc++.h> using namespace std; int percent_landscape(int H,int W,int R[500][500],int G[500][500],int B[500][500]){ int kindagreen=0,kindayellow=0; for(int i=0;i<H;i++) for(int j=0;j<W;j++) { int disttoy=0; disttoy=B[i][j]; disttoy=max(disttoy,abs(160-R[i][j])); disttoy=max(disttoy,abs(130-G[i][j])); if(G[i][j]>=160&&R[i][j]<=160&&B[i][j]<=100) kindagreen++; if(disttoy<=100) kindayellow++; } } int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) { int kindagreen=0,kindayellow=0; for(int i=0;i<H;i++) for(int j=0;j<W;j++) { int disttoy=0; disttoy=B[i][j]; disttoy=max(disttoy,abs(160-R[i][j])); disttoy=max(disttoy,abs(130-G[i][j])); if(G[i][j]>=160&&R[i][j]<=170&&B[i][j]<=100) kindagreen++; else if(G[i][j]>=100&&R[i][j]<=120&&B[i][j]<=70) kindagreen++; if(disttoy<=100) kindayellow++; } cerr<<kindagreen<<'\n'; if(kindagreen+kindayellow>=H*W/5) return 2; return 1; }

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

artclass.cpp: In function 'int percent_landscape(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
   17 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...