# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1093376 | JuanJL | Jetpack (COCI16_jetpack) | C++17 | 27 ms | 16412 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 10;
const int MAXM = 100000+5;
#define fst first
#define snd second
#define pb push_back
#define SZ(x) (int)x.size()
#define ALL(x) x.begin(),x.end()
#define forn(i,a,b) for(int i = a; i < b; i++)
#define mset(a,v) memset(a,v,sizeof(a))
typedef int ll;
//vector<pair<ll,ll>> adj[MAXN][MAXM];
bool visited[MAXN][MAXM];
pair<ll,ll> parent[MAXN][MAXM];
string table[MAXN];
ll n=10, m;
void dfs(ll y, ll x, ll py, ll px){
if(visited[y][x]) return;
visited[y][x]=true;
parent[y][x]={py,px};
if(y==n-1 && x+1<m && table[y][x+1]=='.') dfs(y,x+1,y,x);
if(y+1<10 && x+1<m && table[y+1][x+1]=='.') dfs(y+1,x+1,y,x);
if(y-1>=0 && x+1<m && table[y-1][x+1]=='.') dfs(y-1,x+1,y,x);
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |