# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
7404 | gs13068 | 고기잡이 (KOI13_fish) | C++98 | 4 ms | 1088 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<cstdio>
#include<algorithm>
std::pair<int,int> a[100];
int x[101];
int y[101];
int main()
{
int res=0;
int i,j,k,t,n,m;
scanf("%*d%d%d",&n,&m);
n>>=1;
for(i=0;i<m;i++)scanf("%d%d",&a[i].first,&a[i].second);
std::sort(a,a+n);
for(i=0;i<m;i++)for(j=0;j<m;j++)
{
for(k=0;k<=n;k++)x[k]=y[k]=0;
for(k=0;k<m;k++)if(a[k].first>=a[i].first&&a[k].second>=a[j].second&&a[k].first+a[k].second-a[i].first-a[j].second<=n)
{
x[a[k].first-a[i].first]++;
y[a[k].second-a[j].second]++;
}
t=0;
for(k=0;k<=n;k++)
{
t+=x[k];
if(k>0&&k<n&&t>res)res=t;
t-=y[n-k];
# | 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... |