| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 497620 | penguin133 | Bitaro the Brave (JOI19_ho_t1) | C++14 | 426 ms | 88548 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define int long long
int dp[1000005], P[3005], S[3005], L[3005][3005];
char g[3005][3005];
priority_queue<int>pq;
pair<int, int> A[1000005];
main(){
ios::sync_with_stdio(0);cin.tie(0);
int h,w,ans = 0;
cin >> h >> w;
for(int i=1;i<=h;i++){
for(int j=1;j<=w;j++)cin >> g[i][j];
}
for(int i=1;i<=h;i++){
for(int j=w;j>=1;j--)L[i][j] = L[i][j+1] + (g[i][j] == 'O');
}
for(int i=1;i<=w;i++){
for(int j=1;j<=h;j++)P[j] = P[j-1] + (g[j][i] == 'J');
for(int j=h;j>=1;j--)S[j] = S[j+1] + (g[j][i] == 'I');
for(int j=1;j<=h;j++)ans += (g[j][i] == 'J') * S[j+1] * L[j][i+1];
}
cout << ans;
}
컴파일 시 표준 에러 (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... | ||||
