답안 #1099356

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1099356 2024-10-11T08:39:38 Z andreiqwer Bitaro the Brave (JOI19_ho_t1) C++17
20 / 100
44 ms 2152 KB
#include <iostream>

using namespace std;

int h, w, cntfin;
char s[3001][3001];
int main()
{
    cin>>h>>w;
    for(int i=1; i<=h; i++)
    {
        for(int j=1; j<=w; j++)
            cin>>s[i][j];
    }

    for(int i=1; i<=h; i++)
    {
        for(int j=1; j<=w; j++)
        {
            if(s[i][j]=='J')
            {
                int ocnt=0, icnt=0;
                for(int l=j+1; l<=w; l++)
                {
                    if(s[i][l]=='O')
                        ocnt++;
                }

                for(int k=i+1; k<=h; k++)
                {
                    if(s[k][j]=='I')
                        icnt++;
                }

                cntfin+=ocnt*icnt;
            }
        }
    }

    cout<<cntfin;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 1 ms 604 KB Output is correct
7 Correct 1 ms 708 KB Output is correct
8 Correct 1 ms 604 KB Output is correct
9 Correct 1 ms 604 KB Output is correct
10 Correct 1 ms 604 KB Output is correct
11 Correct 1 ms 604 KB Output is correct
12 Correct 1 ms 604 KB Output is correct
13 Correct 1 ms 712 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 1 ms 604 KB Output is correct
7 Correct 1 ms 708 KB Output is correct
8 Correct 1 ms 604 KB Output is correct
9 Correct 1 ms 604 KB Output is correct
10 Correct 1 ms 604 KB Output is correct
11 Correct 1 ms 604 KB Output is correct
12 Correct 1 ms 604 KB Output is correct
13 Correct 1 ms 712 KB Output is correct
14 Correct 26 ms 1884 KB Output is correct
15 Correct 1 ms 1628 KB Output is correct
16 Correct 17 ms 1368 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 39 ms 2152 KB Output is correct
19 Correct 16 ms 2140 KB Output is correct
20 Incorrect 44 ms 1884 KB Output isn't correct
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 1 ms 604 KB Output is correct
7 Correct 1 ms 708 KB Output is correct
8 Correct 1 ms 604 KB Output is correct
9 Correct 1 ms 604 KB Output is correct
10 Correct 1 ms 604 KB Output is correct
11 Correct 1 ms 604 KB Output is correct
12 Correct 1 ms 604 KB Output is correct
13 Correct 1 ms 712 KB Output is correct
14 Correct 26 ms 1884 KB Output is correct
15 Correct 1 ms 1628 KB Output is correct
16 Correct 17 ms 1368 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 39 ms 2152 KB Output is correct
19 Correct 16 ms 2140 KB Output is correct
20 Incorrect 44 ms 1884 KB Output isn't correct
21 Halted 0 ms 0 KB -