# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
531985 | nguyentunglam | Bitaro the Brave (JOI19_ho_t1) | C++14 | 281 ms | 9168 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#define forin(i, a, b) for(int i = a; i <= b; i++)
#define forde(i, a, b) for(int i = a; i >= b; i--)
#define fi first
#define se second
#define ll long long
using namespace std;
const int N = 3e3 + 10;
char a[N][N];
int row[N], col[N];
long long res;
int main()
{
int h, w; cin >> h >> w;
forin(i, 1, h)
{
string s; cin >> s;
forin(j, 0, s.size()-1) a[i][j+1] = s[j];
}
forde(i, h, 1) forde(j, w, 1)
{
if (a[i][j] == 'O') row[i]++;
if (a[i][j] == 'I') col[j]++;
if (a[i][j] == 'J') res +=row[i]*col[j];
}
cout << res;
}
컴파일 시 표준 에러 (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... |