| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 153353 | junodeveloper | Bitaro the Brave (JOI19_ho_t1) | C++14 | 311 ms | 53368 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define sz(x) ((int)x.size())
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
int h,w;
int tmp[3010][3010];
char s[3010][3010];
int main() {
scanf("%d%d",&h,&w);
int i,j;
for(i=0;i<h;i++) scanf("%s",s[i]);
for(i=0;i<h;i++) {
int c=0;
for(j=w-1;j>=0;j--) {
if(s[i][j]=='O') c++;
else if(s[i][j]=='J') tmp[i][j]=c;
}
}
ll ans=0;
for(j=0;j<w;j++) {
int c=0;
for(i=h-1;i>=0;i--) {
if(s[i][j]=='I') c++;
else if(s[i][j]=='J') ans+=tmp[i][j]*c;
}
}
printf("%lld",ans);
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... | ||||
