Submission #1205526
Source Code Expand
#include<bits/stdc++.h> using namespace std; typedef pair<int,int>P; int p[40][40]; P ba[500]; P ca[500]; string res[500]; int main(){ int h,w,k,t; cin>>h>>w>>k>>t; for(int i=0;i<k;i++){ int a,b,c,d; cin>>a>>b>>c>>d; ba[i]=P(a,b); ca[i]=P(c,d); p[a][b]=1; p[c][d]=1; } for(int i=0;i<k;i++){ if(ba.first[i]<ca[i].first){ if(!p[ba[i].first+1][ba[i].second]){swap(p[ba[i].first][ba[i].second],p[ba[i].first+1][ba[i].second]); res[i].push_back('R'); } else res[i].push_back('-'); } else{ if(!p[ba[i].first-1][ba[i].second]){ swap(p[ba[i].first][ba[i].second],p[ba[i].first-1][ba[i].second]); res[i].push_back('L'); } else res[i].push_back('-'); } } cout<<1<<endl; for(int i=0;i<k;i++)cout<<res[0]; cout<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - 日本橋大渋滞 |
User | Rho17 |
Language | C++14 (Clang 3.8.0) |
Score | 0 |
Code Size | 859 Byte |
Status | CE |
Compile Error
./Main.cpp:1:9: fatal error: 'bits/stdc++.h' file not found #include<bits/stdc++.h> ^ 1 error generated.