# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
84858 | sjhuang26 | Tracks in the Snow (BOI13_tracks) | C++14 | 1179 ms | 146708 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<iostream>
#include<queue>
#include<string>
using namespace std;
typedef pair<int,int>ii;
queue<ii>q[2];
int R,C,K=0,res=0;
bool s;
string d[4000];
const string fr="FR";
int main(){
cin>>R>>C;
q[0]=queue<ii>();
q[1]=queue<ii>();
for(int i=0;i<R;++i){
cin>>ws;
cin>>d[i];
for(int j=0;j<C;++j)if(d[i][j]=='.')++K;
}
s=d[0][0]==fr[1];
d[0][0]='.';
q[s].push({0,0});
while(K<R*C){
//cout<<"---"<<K<<endl;
//cout<<q[0].size()<<' '<<q[1].size()<<endl;
++res;
q[!s]=queue<ii>();
while(!q[s].empty()){
++K;
//cout<<"IT"<<endl;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |