| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 680441 | tigar | Bitaro the Brave (JOI19_ho_t1) | C++14 | 444 ms | 161532 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll os[3003][3003], is[3003][3003];
int main()
{
int H, W;
cin>>H>>W;
string rows[3003];
for(int i=0; i<H; i++)cin>>rows[i];
for(int i=0; i<H; i++)
{
int cnt=0;
for(int j=W-1; j>=0; j--)
{
os[i][j]=cnt;
if(rows[i][j]=='O')cnt++;
}
}
for(int i=0; i<W; i++)
{
int cnt=0;
for(int j=H-1; j>=0; j--)
{
is[j][i]=cnt;
if(rows[j][i]=='I')cnt++;
}
}
ll rezz=0;
for(int i=0; i<H; i++)
{
for(int j=0; j<W; j++)
{
if(rows[i][j]=='J')rezz+=os[i][j]*is[i][j];
//cout<<os[i][j]<<" ";
}
//cout<<endl;
}
cout<<rezz;
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
