Submission #945247

#TimeUsernameProblemLanguageResultExecution timeMemory
945247professionalACerBitaro the Brave (JOI19_ho_t1)C++17
20 / 100
1049 ms604 KiB
#include <iostream> using namespace std; int main() { int H, W; cin >> H >> W; int ans = 0; char grid[H][W]; for (int i = 0; i < H; i++) for (int j = 0; j < W; j++) cin >> grid[i][j]; for (int i = 1; i <= H; i++) for (int j = 1; j <= W; j++) for (int k = i; k <= H; k++) for (int l = j; l <= W; l++) ans += (grid[i - 1][j - 1] == 'J' && grid[i - 1][l - 1] == 'O' && grid[k - 1][j - 1] == 'I'); cout << ans << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...