# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
375086 | daniel920712 | Naan (JOI19_naan) | C++14 | 352 ms | 200220 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
using namespace std;
vector < long long > sum[1005];
long long all[1005];
int main()
{
long long N,M,i,j,k,tt=0,t,x;
scanf("%lld %lld",&N,&M);
x=M;
for(i=0;i<N;i++)
{
tt=0;
sum[i].push_back(tt);
for(j=0;j<M;j++)
{
scanf("%lld",&t);
all[i]+=t;
for(k=0;k<N*M;k++)
{
tt+=t;
sum[i].push_back(tt);
}
}
}
M*=(N*M);
//printf("%lld\n",M);
for(i=1;i<M;i++)
{
if(sum[0][i]/all[0]>=x&&(sum[1][M]-sum[1][i])/all[1]>=x)
{
printf("%lld %lld\n",i,M/x);
printf("1 2\n");
return 0;
}
if(sum[1][i]/all[1]>=x&&(sum[0][M]-sum[0][i])/all[0]>=x)
{
printf("%lld %lld\n",i,M/x);
printf("2 1\n");
return 0;
}
}
printf("-1\n");
return 0;
}
컴파일 시 표준 에러 (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... |