| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 717581 | vjudge1 | Bitaro the Brave (JOI19_ho_t1) | C++14 | 1 ms | 300 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define int long long int
char grid[101][101];
int findingnemo(int x,int y){
int ans=0;
for(int a=1;a<=x;a++){
for(int b=1;b<=y;b++){
ans++;
}
}
return ans;
}
int32_t main(){
int h,w,jx,jy,counto=0,counti=0,ans;
cin >> h >> w;
for(int x=0;x<h;x++){
for(int y=0;y<w;y++){
cin >> grid[x][y];
}
}
for(int x=0;x<h;x++){
for(int y=0;y<w;y++){
counto=0;
counti=0;
if(grid[x][y]=='J'){
for(int j=0;j<w;j++){
if(grid[x][j]=='O'){
if(y<j) counto++;
}
}
for(int i=0;i<h;i++){
if(grid[i][y]=='I'){
if(x<i) counti++;
}
}
if((counto>=1)&&(counti>=1)) ans = ans + findingnemo(counto,counti);
}
}
}
cout << ans;
}
컴파일 시 표준 에러 (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... | ||||
