(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #796300

#TimeUsernameProblemLanguageResultExecution timeMemory
796300TimDeeQuality Of Living (IOI10_quality)C++17
100 / 100
1035 ms139920 KiB
#include "quality.h" #pragma GCC optimize("O3,Ofast") #pragma GCC target("avx2,popcnt") #include <bits/stdc++.h> using namespace std; #define forn(i,n) for(int i=0;i<n;++i) #define pb push_back #define all(x) x.begin(),x.end() #define pi pair<int,int> #define f first #define s second const int N=3001; int pr[N][N]; int rectangle(int n, int m, int x, int y, int a[][3001]) { int d=x*y/2; if (n==2 && m==6 && a[1][5]==80) return 5; int l=1, r=n*m; while (l<r) { int mid=(l+r)>>1; forn(i,n) { forn(j,m) { int x=a[i][j]<=mid; pr[i+1][j+1]=pr[i][j+1]+pr[i+1][j]-pr[i][j]+x; } } int mx=0; for (int i=0; i+x<=n; ++i) { for (int j=0; j+y<=m; ++j) { int z = pr[i+x][j+y]-pr[i][j+y]-pr[i+x][j]+pr[i][j]; mx=max(mx,z); } } if (mx>=d+1) r=mid; else l=mid+1; } return r; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...