| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 520896 | emon_2007 | Bitaro the Brave (JOI19_ho_t1) | C++17 | 710 ms | 158832 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll h, w, cnt, a[3001][3001], b[3001][3001], k, l;
char c[3001][3001];
int main()
{
cin >> h >> w;
for(int i = 1; i <= h; i++)
{
for(int j = 1; j <= w; j++)
{
cin >> c[i][j];
}
}
for(int j = w; j >= 1; j--)
{
for(int i = h; i >= 1; i--)
{
if(c[i][j] == 'I')
{
k++;
}
a[i][j] = k;
}
k = 0;
}
for(int i = h; i >= 1; i--)
{
for(int j = w; j >= 1; j--)
{
if(c[i][j] == 'O')
{
l++;
}
b[i][j] = l;
}
l = 0;
}
for(int i = 1; i <= h; i++)
{
for(int j = 1; j <= w; j++)
{
if(c[i][j] == 'J')
{
cnt += a[i][j] * b[i][j];
}
}
}
cout << cnt;
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... | ||||
