6798 | 2023-12-19 10:17:04 | turitamas | Bolha a számegyenesen | cpp17 | Wrong answer 0/100 | 3ms | 4876 KiB |
#include <iostream>
using namespace std;
int main()
{
int n, pozicio, jump;
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 | 2064 KiB | ||||
subtask2 | 0/15 | ||||||
3 | Wrong answer | 3ms | 2280 KiB | ||||
4 | Wrong answer | 3ms | 2492 KiB | ||||
5 | Wrong answer | 3ms | 2736 KiB | ||||
6 | Wrong answer | 3ms | 2816 KiB | ||||
subtask3 | 0/10 | ||||||
7 | Wrong answer | 3ms | 2940 KiB | ||||
8 | Wrong answer | 3ms | 3068 KiB | ||||
9 | Wrong answer | 3ms | 3160 KiB | ||||
10 | Wrong answer | 3ms | 3336 KiB | ||||
11 | Wrong answer | 3ms | 3428 KiB | ||||
subtask4 | 0/75 | ||||||
12 | Wrong answer | 3ms | 3556 KiB | ||||
13 | Wrong answer | 3ms | 3768 KiB | ||||
14 | Wrong answer | 3ms | 3844 KiB | ||||
15 | Wrong answer | 3ms | 4000 KiB | ||||
16 | Wrong answer | 3ms | 4132 KiB | ||||
17 | Wrong answer | 3ms | 4336 KiB | ||||
18 | Wrong answer | 3ms | 4420 KiB | ||||
19 | Wrong answer | 3ms | 4664 KiB | ||||
20 | Wrong answer | 3ms | 4724 KiB | ||||
21 | Wrong answer | 3ms | 4876 KiB |