Submission #1205512
Source Code Expand
#include<iostream> #include<string> #include<cmath> #include<queue> #include<map> #include<set> #include<list> #include<iomanip> #include<vector> #include<functional> #include<algorithm> #include<cstdio> #include<unordered_map> using namespace std; typedef long long ll; struct A{ int a,b; }; struct B{ int c,d; }; A a[450]; B b[450]; bool c[10000][31][31]; int main() { int h,w,k,t; cin>>h>>w>>k>>t; for(int i=0;i<10000;i++){ for(itn j=0;j<=30;j++){ for(int z=0;z<=30;z++){ c[i][j][z]=false; } } } for(int i=0;i<k;i++){ cin>>a[i].a>>a[i].b>>b[i].c>>b[i].c; c[0][a[i].a][a[i].b]=true; } cout<<t/2<<endl; for(int i=0;i<k;i++){ int x=a[i].a,y=a[i].y; for(int j=0;j<t/2;j++){ if(x==b[i].c&&d==b[i].d) cout<<'-'; else if(x<b[i].c){ cout<<'U'; } else if(x>b[i].c){ cout<<'D'; } else if(y<b[i].d){ cout<<'R'; } else if(y>b[i].d){ cout<<'L'; } } cout<<endl; } }
Submission Info
Submission Time | |
---|---|
Task | B - 日本橋大渋滞 |
User | Thistle |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 997 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:29:7: error: ‘itn’ was not declared in this scope for(itn j=0;j<=30;j++){ ^ ./Main.cpp:29:15: error: ‘j’ was not declared in this scope for(itn j=0;j<=30;j++){ ^ ./Main.cpp:41:23: error: ‘struct A’ has no member named ‘y’ int x=a[i].a,y=a[i].y; ^ ./Main.cpp:43:18: error: ‘d’ was not declared in this scope if(x==b[i].c&&d==b[i].d) ^