# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
28078 | 외않된데? (#71) | 도시와 비트코인 (FXCUP2_city) | C++98 | 149 ms | 65536 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
typedef pair<int, int> p;
bool city[333][333];
int main()
{
//n�� ����, m�� ����
int n, m;
scanf("%d %d", &n, &m);
for (int i = 0; i <m; ++i)
{
for (int j = 0; j < n; ++j)
{
scanf("%d", &city[i][j]);
}
}
queue<p> q;
q.push(p(0, 0));
while (!q.empty())
{
p now = q.front();
q.pop();
if (now.first == m - 1 && now.second == n - 1)
{
printf("Yes");
return 0;
}
if (now.first + 1 < m)
{
q.push(p(now.first + 1, now.second));
}
if (now.second + 1 < n)
{
q.push(p(now.first, now.second + 1));
}
}
printf("No");
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |