| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 428329 | MOUF_MAHMALAT | Rectangles (IOI19_rect) | C++14 | 5084 ms | 321004 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "rect.h"
#include<bits/stdc++.h>
using namespace std;
typedef int ll;
ll dp[80][80][80][80][2],ans,a[80][80];
ll best(ll x,ll y,ll xx,ll yy,bool b)
{
if(x==xx&&y==yy)
return a[x][y];
ll &r=dp[x][y][xx][yy][b];
if(r!=-1)
return r;
if(x!=xx)
{
if(b)
return r=max(best(x,y,xx-1,yy,b),best(xx,y,xx,yy,b));
else
return r=min(best(x,y,xx-1,yy,b),best(xx,y,xx,yy,b));
}
else
{
if(b)
return r=max(best(x,y,x,yy-1,b),a[x][yy]);
else
return r=min(best(x,y,x,yy-1,b),a[x][yy]);
}
}
long long count_rectangles(vector<vector<int> > v)
{
for(ll i=0; i<v.size(); i++)
for(ll j=0; j<v[i].size(); j++)
a[i][j]=v[i][j];
memset(dp,-1,sizeof dp);
for(ll i=1; i<v.size()-1; i++)
for(ll j=1; j<v[i].size()-1; j++)
for(ll o=i; o<v.size()-1; o++)
for(ll p=j; p<v[i].size()-1; p++)
if(best(i,j,o,p,1)<min(min(best(i-1,j,i-1,p,0),best(o+1,j,o+1,p,0)),min(best(i,j-1,o,j-1,0),best(i,p+1,o,p+1,0))))
ans++;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
