| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 997902 | eloj | Bitaro the Brave (JOI19_ho_t1) | C++14 | 1025 ms | 74640 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define ll long long
#define pb push_back
#define pii pair<ll,ll>
int main(){
ll ans=0;
ll n, m;
cin >> n >> m;
char c[n+1][m+1];
vector <pii> pos;
for(int i=0; i<n; i++){
for(int j=0; j<m; j++){
cin >> c[i][j];
if(c[i][j] == 'J') pos.pb({i,j});
}
}
for(auto x:pos){
ll a=x.ff, b=x.ss, I=0, O=0;
for(int i=a; i<n; i++){
if(c[i][b] == 'I') I++;
}
for(int i=b; i<m; i++){
if(c[a][i] == 'O') O++;
}
ans+=I*O;
}
cout << ans;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
