| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1332902 | piolk | Bitaro the Brave (JOI19_ho_t1) | C++20 | 66 ms | 10152 KiB |
#include <bits/stdc++.h>
using namespace std;
constexpr int maxn=3007;
string grid[maxn];
int row[maxn],clmn[maxn];
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
int h,w;
cin>>h>>w;
for (int i=0;i<h;i++){
cin>>grid[i];
}
long long ans=0;
for (int i=h-1;i>=0;i--){
for (int j=w-1;j>=0;j--){
if (grid[i][j]=='J'){
ans+=row[i]*clmn[j];
} else if (grid[i][j]=='O'){
row[i]++;
} else {
clmn[j]++;
}
}
}
cout<<ans<<"\n";
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... | ||||
