# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
219604 | MKopchev | Bitaro the Brave (JOI19_ho_t1) | C++14 | 377 ms | 152184 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
const int nmax=3e3+42;
int n,m;
int sums[3][nmax][nmax];
int mem[nmax][nmax];
int ask(int type,int x1,int y1,int x2,int y2)
{
if(x1>x2||y1>y2)return 0;
return sums[type][x2][y2]-sums[type][x1-1][y2]-sums[type][x2][y1-1]+sums[type][x1-1][y1-1];
}
int main()
{
scanf("%i%i",&n,&m);
for(int i=1;i<=n;i++)
for(int j=1;j<=m;j++)
{
char c=getchar();
while(c!='J'&&c!='O'&&c!='I')c=getchar();
if(c=='J')sums[0][i][j]=1,mem[i][j]=0;
else if(c=='O')sums[1][i][j]=1,mem[i][j]=1;
else sums[2][i][j]=1,mem[i][j]=2;
}
for(int type=0;type<3;type++)
컴파일 시 표준 에러 (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... |