# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
230159 | EmmanuelAC | Bob (COCI14_bob) | C++14 | 75 ms | 4392 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll mat[501][501], h[501][501];
int main(){
int n, m; scanf("%d %d",&n, &m);
for(int i=1; i<=n; i++){
for(int j=1; j<=m; j++){
scanf("%lld", &mat[i][j]);
if(mat[i][j] == mat[i-1][j])
h[i][j] = h[i-1][j] +1;
else
h[i][j] = 1;
}
}
ll sol = 0;
for(int i=1; i<=n; i++){
for(int j=1; j<=m; j++){
ll curr_min = h[i][j];
for(int k=0; k<j; k++){
if(mat[i][j -k] == mat[i][j]){
curr_min = min(h[i][j -k], curr_min);
sol += curr_min;
}
else{
break;
}
}
}
}
printf("%lld\n", sol);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |