6789 | 2023-12-19 09:59:50 | turitamas | Bolha a számegyenesen | cpp17 | Wrong answer 0/100 | 3ms | 5004 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 | 1744 KiB | ||||
2 | Wrong answer | 3ms | 1908 KiB | ||||
subtask2 | 0/15 | ||||||
3 | Wrong answer | 3ms | 2160 KiB | ||||
4 | Wrong answer | 3ms | 2368 KiB | ||||
5 | Wrong answer | 3ms | 2448 KiB | ||||
6 | Wrong answer | 3ms | 2668 KiB | ||||
subtask3 | 0/10 | ||||||
7 | Wrong answer | 3ms | 2884 KiB | ||||
8 | Wrong answer | 3ms | 3120 KiB | ||||
9 | Wrong answer | 3ms | 3220 KiB | ||||
10 | Wrong answer | 3ms | 3448 KiB | ||||
11 | Wrong answer | 3ms | 3636 KiB | ||||
subtask4 | 0/75 | ||||||
12 | Wrong answer | 3ms | 3884 KiB | ||||
13 | Wrong answer | 3ms | 4092 KiB | ||||
14 | Wrong answer | 3ms | 4248 KiB | ||||
15 | Wrong answer | 3ms | 4488 KiB | ||||
16 | Wrong answer | 3ms | 4732 KiB | ||||
17 | Wrong answer | 3ms | 4816 KiB | ||||
18 | Wrong answer | 3ms | 4760 KiB | ||||
19 | Wrong answer | 3ms | 4756 KiB | ||||
20 | Wrong answer | 3ms | 5004 KiB | ||||
21 | Wrong answer | 3ms | 4976 KiB |