# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
110670 |
2019-05-11T20:10:45 Z |
ioilolcom |
Bob (COCI14_bob) |
C++14 |
|
1000 ms |
2692 KB |
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
typedef long long int ll;
int n,m;
const int N=507+7;
int g[N][N];
set<int> st;
bool check(int x,int y,int xx,int yy){
st.clear();
for(int i=x; i<=xx; i++) {
for(int j=y; j<=yy; j++) {
st.insert(g[i][j]);
}
}
return ((int)st.size()==1);
}
int main()
{
ios_base:: sync_with_stdio(false); cin.tie(0);
cin>>n>>m;
int cnt=0;
for(int i=1; i<=n; i++) {
for(int j=1; j<=m; j++) {
cin>>g[i][j];
}
}
for(int i=1; i<=n; i++) {
for(int j=1; j<=m; j++) {
for(int k=i; k<=n; k++) {
for(int kk=j; kk<=m; kk++) {
if(check(i,j,k,kk)) cnt++;
}
}
}
}
cout<<cnt<<endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1079 ms |
512 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1074 ms |
512 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1073 ms |
1280 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1058 ms |
1536 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1085 ms |
1628 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1076 ms |
1572 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
54 ms |
2692 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
67 ms |
2680 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
83 ms |
2580 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
62 ms |
2516 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |