# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
40087 | Hebisuke | Retro (COCI17_retro) | C++14 | 371 ms | 335268 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "stdio.h"
#include "queue"
#include "algorithm"
#include "stack"
using namespace std;
queue<pair<int,pair<int, int> > > q;
int dp[305][305][305],s,r,x,y;
char tb[305][305];
pair<int, int > p[305][305][305];
stack<char> st;
main()
{
scanf("%d %d",&r,&s);
for(int i=0;i<r;i++)
scanf("%s",tb[i]);
for(int i=0;i<r;i++)
for(int j=0;j<s;j++){
for(int k=0;k<r;k++) {dp[i][j][k]=-1;p[i][j][k]=make_pair(j,k);}
}
for(int i=0;i<s;i++) if(tb[r-1][i]=='M') {q.push(make_pair(r-1,make_pair(i,0)));dp[r-1][i][0]=0;
break;}
while(!q.empty())
{
int rr=q.front().first, cc=q.front().second.first , f=q.front().second.second;
q.pop();
//printf("%d %d %d\n",rr,cc,f);
if(rr==0) continue;
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |