6791 | 2023-12-19 10:04:15 | turitamas | Bolha a számegyenesen | cpp17 | Wrong answer 0/100 | 3ms | 3312 KiB |
#include <iostream>
using namespace std;
int main()
{
int n, pozicio, jump=0;
char s;
cin>>n;
for(int i=0; i<n; i++)
{
cin>>s;
if(s=='L')
{
pozicio--;
}
if(s=='R')
{
pozicio++;
}
}
jump=abs(jump-pozicio);
cout<<jump;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 1876 KiB | ||||
2 | Wrong answer | 3ms | 2068 KiB | ||||
subtask2 | 0/15 | ||||||
3 | Wrong answer | 3ms | 2276 KiB | ||||
4 | Wrong answer | 2ms | 2360 KiB | ||||
5 | Wrong answer | 2ms | 2376 KiB | ||||
6 | Wrong answer | 3ms | 2384 KiB | ||||
subtask3 | 0/10 | ||||||
7 | Wrong answer | 3ms | 2404 KiB | ||||
8 | Wrong answer | 3ms | 2476 KiB | ||||
9 | Wrong answer | 3ms | 2592 KiB | ||||
10 | Wrong answer | 3ms | 2744 KiB | ||||
11 | Wrong answer | 3ms | 2904 KiB | ||||
subtask4 | 0/75 | ||||||
12 | Wrong answer | 3ms | 3056 KiB | ||||
13 | Wrong answer | 3ms | 3072 KiB | ||||
14 | Wrong answer | 3ms | 3140 KiB | ||||
15 | Wrong answer | 3ms | 3128 KiB | ||||
16 | Wrong answer | 3ms | 3132 KiB | ||||
17 | Wrong answer | 3ms | 3056 KiB | ||||
18 | Wrong answer | 3ms | 3052 KiB | ||||
19 | Wrong answer | 3ms | 3120 KiB | ||||
20 | Wrong answer | 3ms | 3272 KiB | ||||
21 | Wrong answer | 3ms | 3312 KiB |