답안 #465073

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
465073 2021-08-15T07:00:31 Z ardaak33 Bitaro the Brave (JOI19_ho_t1) C++17
100 / 100
421 ms 83876 KB
#include<bits/stdc++.h>
using namespace std;
string s[3005];
int tahtayan[3005][3005];
int tahtadik[3005][3005];
long long int sonuc=0;
int main() {
int n,m;
cin >> n >> m;

for (int i = 1; i <= n; i++)
{
    cin >> s[i];

    for (int j = 1; j <= m; j++)
    {
        if(s[i][j-1]=='O')
        tahtayan[i][j]=tahtayan[i][j-1]+1;
        else
        tahtayan[i][j]=tahtayan[i][j-1];
        if(s[i][j-1]=='I')
        tahtadik[j][i]=tahtadik[j][i-1]+1;
        else
        tahtadik[j][i]=tahtadik[j][i-1];
    }
    
}
for (int i = 1; i <= n; i++)
    for (int j = 0; j < m; j++)
        if(s[i][j]=='J')
        sonuc+=(tahtayan[i][m]-tahtayan[i][j+1])*(tahtadik[j+1][n]-tahtadik[j+1][i]);


    cout <<sonuc;









    
}

Compilation message

joi2019_ho_t1.cpp: In function 'int main()':
joi2019_ho_t1.cpp:28:1: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   28 | for (int i = 1; i <= n; i++)
      | ^~~
joi2019_ho_t1.cpp:34:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   34 |     cout <<sonuc;
      |     ^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 460 KB Output is correct
5 Correct 2 ms 1228 KB Output is correct
6 Correct 1 ms 1100 KB Output is correct
7 Correct 1 ms 1228 KB Output is correct
8 Correct 2 ms 1228 KB Output is correct
9 Correct 2 ms 1100 KB Output is correct
10 Correct 1 ms 1168 KB Output is correct
11 Correct 2 ms 1228 KB Output is correct
12 Correct 1 ms 1100 KB Output is correct
13 Correct 1 ms 1168 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 460 KB Output is correct
5 Correct 2 ms 1228 KB Output is correct
6 Correct 1 ms 1100 KB Output is correct
7 Correct 1 ms 1228 KB Output is correct
8 Correct 2 ms 1228 KB Output is correct
9 Correct 2 ms 1100 KB Output is correct
10 Correct 1 ms 1168 KB Output is correct
11 Correct 2 ms 1228 KB Output is correct
12 Correct 1 ms 1100 KB Output is correct
13 Correct 1 ms 1168 KB Output is correct
14 Correct 10 ms 5836 KB Output is correct
15 Correct 2 ms 2124 KB Output is correct
16 Correct 7 ms 4812 KB Output is correct
17 Correct 1 ms 1612 KB Output is correct
18 Correct 12 ms 6988 KB Output is correct
19 Correct 11 ms 6560 KB Output is correct
20 Correct 11 ms 6932 KB Output is correct
21 Correct 13 ms 7084 KB Output is correct
22 Correct 11 ms 6556 KB Output is correct
23 Correct 11 ms 6984 KB Output is correct
24 Correct 13 ms 6988 KB Output is correct
25 Correct 11 ms 6676 KB Output is correct
26 Correct 12 ms 6996 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 460 KB Output is correct
5 Correct 2 ms 1228 KB Output is correct
6 Correct 1 ms 1100 KB Output is correct
7 Correct 1 ms 1228 KB Output is correct
8 Correct 2 ms 1228 KB Output is correct
9 Correct 2 ms 1100 KB Output is correct
10 Correct 1 ms 1168 KB Output is correct
11 Correct 2 ms 1228 KB Output is correct
12 Correct 1 ms 1100 KB Output is correct
13 Correct 1 ms 1168 KB Output is correct
14 Correct 10 ms 5836 KB Output is correct
15 Correct 2 ms 2124 KB Output is correct
16 Correct 7 ms 4812 KB Output is correct
17 Correct 1 ms 1612 KB Output is correct
18 Correct 12 ms 6988 KB Output is correct
19 Correct 11 ms 6560 KB Output is correct
20 Correct 11 ms 6932 KB Output is correct
21 Correct 13 ms 7084 KB Output is correct
22 Correct 11 ms 6556 KB Output is correct
23 Correct 11 ms 6984 KB Output is correct
24 Correct 13 ms 6988 KB Output is correct
25 Correct 11 ms 6676 KB Output is correct
26 Correct 12 ms 6996 KB Output is correct
27 Correct 379 ms 81464 KB Output is correct
28 Correct 8 ms 9932 KB Output is correct
29 Correct 34 ms 17628 KB Output is correct
30 Correct 8 ms 9804 KB Output is correct
31 Correct 287 ms 69744 KB Output is correct
32 Correct 368 ms 83520 KB Output is correct
33 Correct 384 ms 83836 KB Output is correct
34 Correct 331 ms 76088 KB Output is correct
35 Correct 393 ms 83684 KB Output is correct
36 Correct 403 ms 83848 KB Output is correct
37 Correct 421 ms 83876 KB Output is correct
38 Correct 256 ms 69444 KB Output is correct
39 Correct 298 ms 69544 KB Output is correct