Submission #1099324

#TimeUsernameProblemLanguageResultExecution timeMemory
1099324ZflopBitaro the Brave (JOI19_ho_t1)C++14
20 / 100
1034 ms856 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define all(x) x.begin(),x.end() #define sor(x) sort(all(x)) #define pi pair<int,int> #define vi vector<int> int N,M; vector<string>A; void solve() { cin >> N >> M; A = vector<string>(N); for (int i = 0; i < N;++i) cin >> A[i]; int cnt = 0; for (int i = 0; i < N;++i) for (int j = 0; j < M;++j) for (int z = i + 1; z < N;++z) for (int y = j + 1; y < M;++y) if (A[i][j] == 'J' && A[i][y] == 'O' && A[z][j] == 'I') ++cnt; cout << cnt; } int main(){ solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...