# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
992809 | Uniq0rn | Jetpack (COCI16_jetpack) | C++14 | 18 ms | 10328 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pi pair<int,int>
#define sz(x) (int)x.size()
const int N = 1e5;
int n,flag;
char grid[10][N+10];
bool vis[10][N+10];
vector<int> ans;
void dfs(int i,int j){
if(flag || vis[i][j] || grid[i][j] == 'X') return ;
vis[i][j] = 1;
if(j == n-1){
flag = 1;
if(sz(ans)%2){
if(ans.back() == n-1) ans.pop_back();
else ans.push_back(n-1);
}
cout << sz(ans)/2 << '\n';
for(int i=0;i<sz(ans)-1;i+=2){
cout << ans[i] << ' ' << ans[i+1]-ans[i] << '\n';
}
return ;
}
if(i == 9){
dfs(i,j+1);
ans.push_back(j);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |