QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#700208 | #9507. ROBOTI | 5un_xiaomivita_msg | 0 | 0ms | 3648kb | C++23 | 1.0kb | 2024-11-02 12:21:56 | 2024-11-02 12:21:56 |
answer
#include<bits/stdc++.h>
#define int long long
#define x first
#define y second
#define endl '\n'
using namespace std;
const int N=1e6+10,INF=1e14,mod=1e9+7,M=2e5+10;
const double eps = 1e-8;
typedef pair<int,int> PII;
typedef pair<PII,int> PIII;
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int qmi(int a,int k){int res=1;while(k){if(k&1) res=res*a%mod;a=a*a%mod;k>>=1;}return res;}
char pp[200][200];
char op[1100][2];
int a[N];
void slove(){
int n;cin>>n;
pp['S']['E']='L';
pp['S']['W']='R';
pp['N']['E']='R';
pp['N']['W']='L';
pp['W']['S']='L';
pp['W']['N']='R';
pp['E']['S']='R';
pp['E']['N']='L';
for(int i=1;i<=n;i++){
cin>>op[i]>>a[i];
}
vector<char>val;
for(int i=2;i<=n;i++){
val.push_back(pp[op[i-1][0]][op[i][0]]);
}
cout<<2*n-1<<" "<<op[1][0]<<endl;
for(int i=1;i<=n;i++){
cout<<"Z "<<a[i]<<endl;//n次
if(i!=n)cout<<val[i-1]<<endl;//n-1次
}
}
signed main(){
ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
int T=1;
cin>>T;
while(T--) slove();
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3648kb
input:
4 4 .... .x.. ..x. .... 2
output:
7 . Z 0
result:
wrong answer Integer parameter [name=robot] equals to 7, violates the range [0, 2]
Subtask #2:
score: 0
Skipped
Dependency #1:
0%
Subtask #3:
score: 0
Skipped
Dependency #1:
0%