6781 | 2023-12-19 09:48:06 | VKristof | Bolha a számegyenesen | cpp17 | Wrong answer 10/100 | 3ms | 4160 KiB |
#include <iostream>
using namespace std;
int main()
{
int a,b=0;
cin>>a;
char c[a];
for(int i=0; i<a; i++)
{
cin>>c[i];
}
for(int i=0; i<a; i++)
{
if(c[i]=='R')
{
b=b-1;
}
else if(c[i]=='L')
{
b=b+1;
}
}
cout<<b;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1744 KiB | ||||
2 | Accepted | 3ms | 1996 KiB | ||||
subtask2 | 0/15 | ||||||
3 | Wrong answer | 3ms | 2208 KiB | ||||
4 | Accepted | 3ms | 2292 KiB | ||||
5 | Accepted | 3ms | 2332 KiB | ||||
6 | Accepted | 3ms | 2420 KiB | ||||
subtask3 | 10/10 | ||||||
7 | Accepted | 3ms | 2416 KiB | ||||
8 | Accepted | 3ms | 2424 KiB | ||||
9 | Accepted | 3ms | 2548 KiB | ||||
10 | Accepted | 3ms | 2804 KiB | ||||
11 | Accepted | 3ms | 2840 KiB | ||||
subtask4 | 0/75 | ||||||
12 | Accepted | 3ms | 2848 KiB | ||||
13 | Wrong answer | 3ms | 2848 KiB | ||||
14 | Accepted | 3ms | 3084 KiB | ||||
15 | Wrong answer | 3ms | 3184 KiB | ||||
16 | Accepted | 3ms | 3416 KiB | ||||
17 | Accepted | 3ms | 3640 KiB | ||||
18 | Accepted | 3ms | 3808 KiB | ||||
19 | Wrong answer | 3ms | 3820 KiB | ||||
20 | Wrong answer | 3ms | 3916 KiB | ||||
21 | Accepted | 3ms | 4160 KiB |