Submission #125447

#TimeUsernameProblemLanguageResultExecution timeMemory
125447MoNsTeR_CuBeArt Class (IOI13_artclass)C++17
7 / 100
77 ms3492 KiB
#include <bits/stdc++.h> #include "artclass.h" using namespace std; #define double long double int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) { int totA = 0, totB = 0, totC = 0; int maxA = 0, maxB = 0, maxC = 0; int minA = INT_MAX, minB = INT_MAX, minC = INT_MAX; for(int i = 0; i < H; i++){ for(int j = 0; j < W; j++){ totA+=R[i][j]; totB+=G[i][j]; totC+=B[i][j]; maxA = max(maxA, R[i][j]); maxB = max(maxB, G[i][j]); maxC = max(maxC, B[i][j]); minA = min(minA, R[i][j]); minB = min(minB, G[i][j]); minC = min(minC, B[i][j]); } } if(minA || minB || minC){ return 4; } if(maxA >= 249 && maxB >= 249 && maxC >= 249) return 1; if(totA > 3 && totB > 3 && totC > 3) return 3;{ } return 2; }

Compilation message (stderr)

artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:36:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if(totA > 3 && totB > 3 && totC > 3) return 3;{
     ^~
artclass.cpp:36:51: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
     if(totA > 3 && totB > 3 && totC > 3) return 3;{
                                                   ^
#Verdict Execution timeMemoryGrader output
Fetching results...