結果
問題 | No.2228 Creeping Ghost |
ユーザー |
|
提出日時 | 2023-04-29 17:07:14 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 2,613 bytes |
コンパイル時間 | 4,184 ms |
コンパイル使用メモリ | 230,900 KB |
実行使用メモリ | 5,320 KB |
最終ジャッジ日時 | 2024-11-18 11:46:00 |
合計ジャッジ時間 | 5,234 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 7 |
ソースコード
#include <iostream>#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using namespace atcoder;typedef long long ll;typedef long double dd;typedef unsigned long long ull;typedef vector<ll> vl;typedef vector<dd> vd;typedef vector<bool> vb;typedef vector<pair<ll,ll>> vl_l;typedef vector<vector<ll>> vvl;typedef vector<vector<dd>> vvd;typedef vector<vector<bool>> vvb;typedef vector<vector<pair<ll,ll>>> vvl_l;typedef vector<vector<vector<ll>>> vvvl;typedef vector<vector<vector<dd>>> vvvd;typedef vector<vector<vector<bool>>> vvvb;typedef vector<vector<vector<pair<ll,ll>>>> vvvl_l;typedef map<ll,ll> ml;typedef set<ll> sl;// #define i_7 (ll)(1E9+7)#define i_7 998244353#define i_5 i_7-2ll mod(ll a){ll c=a%i_7;if(c>=0)return c;return c+i_7;}typedef pair<ll,ll> l_l;typedef pair<dd,dd> d_d;ll inf=(ll)1E18;#define rep(i,l,r) for(ll i=l;i<=r;i++)#define pb push_backll max(ll a,ll b){if(a<b)return b;else return a;}ll min(ll a,ll b){if(a>b)return b;else return a;}dd EPS=1E-9;dd PI=acos(-1);// #define endl "\n"#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);template<class T,class S>inline bool chmax(T &a, S b) {if(a < b) {a = (T)b;return true;}return false;}template<class T,class S>inline bool chmin(T &a, S b) {if(a > b) {a = (T)b;return true;}return false;}ll hpow(ll x,ll y){if(y==0)return 1;ll res=hpow(x,y/2);res = mod(res*res);if(y%2==1){res *= x;res = mod(res);}return mod(res);}ll hpow_m(ll x,ll y,ll m){if(y==0)return 1;ll res=hpow_m(x,y/2,m);res = (res*res)%m;if(y%2==1){res *= x;res %= m;}return res%m;}signed main(){fastiostring ans = "RDRL";vector<string> tmps = {"RDRL","RRDD","ULRL","ULLR","UULL","RDUD"};string tmp = "";for(string s : tmps)tmp += s;ll t;cin>>t;while((ll)ans.size() < t){ans += tmp;}while((ll)ans.size() > t){ans.pop_back();}cout << ans << endl;// ll nx = 1;// ll ny = 1;// cerr << nx << ' ' << ny << endl;// rep(i,0,(ll)ans.size()-1){// if(ans[i] == 'R'){// nx ++;// }else if(ans[i] == 'L'){// nx --;// }else if(ans[i] == 'U'){// ny --;// }else if(ans[i] == 'D'){// ny ++;// }// cerr << nx << ' ' << ny << endl;// }return 0;}