Submission #465073

#TimeUsernameProblemLanguageResultExecution timeMemory
465073ardaak33Bitaro the Brave (JOI19_ho_t1)C++17
100 / 100
421 ms83876 KiB
#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 (stderr)

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;
      |     ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...