Submission #6754257
Source Code Expand
#include<bits/stdc++.h> using namespace std; int v[100000]; int Min=0x7f7f7f7f; void dfs(int x,int y) { if(x>40||x<0||v[x]==1) { return; } if(n==b) { tot=min(tot,t); return; } if(y>tot) return; v[x]=1; dfs(x+1,y+1); dfs(x-1,y+1); dfs(x+5,y+1); dfs(x-5,y+1); dfs(x+10,y+1); dfs(x-10,y+1); v[x]=0; } int main() { int a,b; cin>>a>>b; dfs(a,0); cout<<tot; }
Submission Info
Submission Time | |
---|---|
Task | B - リモコン |
User | luogu_bot1 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 428 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘void dfs(int, int)’: ./Main.cpp:11:5: error: ‘n’ was not declared in this scope if(n==b) ^ ./Main.cpp:11:8: error: ‘b’ was not declared in this scope if(n==b) ^ ./Main.cpp:13:3: error: ‘tot’ was not declared in this scope tot=min(tot,t); ^ ./Main.cpp:13:15: error: ‘t’ was not declared in this scope tot=min(tot,t); ^ ./Main.cpp:16:7: error: ‘tot’ was not declared in this scope if(y>tot) return; ^ ./Main.cpp: In function ‘int main()’: ./Main.cpp:31:8: error: ‘tot’ was not declared in this scope cout<<tot; ^