Submission #396408

#TimeUsernameProblemLanguageResultExecution timeMemory
396408andremfqArt Class (IOI13_artclass)C++17
6 / 100
82 ms3320 KiB
//ideia leonardo #include"artclass.h" #include <bits/stdc++.h> #define mp make_pair #define mt make_tuple #define ff first #define ss second using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; const ll INFL = (1LL<<62)-1; const int INF = (1<<30)-1; const int MAXN = 500; //int R[500][500], G[500][500], B[500][500]; int style(int n, int m, int r[500][500], int g[500][500], int b[500][500]){ ll medr =0, medg = 0, medb = 0; ll score[4] {0,0,0,0}; for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ medr+=r[j][i]; medg+=g[j][i]; medb+=b[j][i]; //if((r[j][i] <= 55 && g[j][i] <= 55 && b[j][i] <= 55) ||(r[j][i] >= 200 && g[j][i] >= 200 && b[j][i] >= 200)) // score[2]++; } } medr/=n*m; medg/=n*m; medb/=n*m; score[0] = (medr-255) + abs(medg-255) + abs(medb-255); score[1] = medr + abs(medg-100) + medb; //double score2 = (double)score[2]/(n*m); //cout << score[0] << ' ' << score[1] << ' ' << score2 << '\n'; if(score[0] <= 130) return 1; if(score[1] <= 230) return 2; return 4; }
#Verdict Execution timeMemoryGrader output
Fetching results...