6800 | 2023-12-19 10:19:12 | HunMartin23 | Decimália | cpp17 | Wrong answer 0/100 | 8ms | 6256 KiB |
#include <iostream>
using namespace std;
int main()
{
int N,db=0,db1=0;
cin>>N;
char S[N];
for (int i=1;i<=N;i++)
{
cin>>S[i];
if (S[i]=='R')
{
db++;
}
else if (S[i]=='L')
{
db1++;
}
}
cout<<abs(db-db1);
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 1880 KiB | ||||
2 | Wrong answer | 3ms | 2072 KiB | ||||
3 | Wrong answer | 3ms | 2308 KiB | ||||
subtask2 | 0/25 | ||||||
4 | Accepted | 3ms | 2396 KiB | ||||
5 | Wrong answer | 3ms | 2544 KiB | ||||
6 | Wrong answer | 3ms | 2740 KiB | ||||
7 | Wrong answer | 3ms | 2848 KiB | ||||
8 | Wrong answer | 3ms | 3256 KiB | ||||
subtask3 | 0/26 | ||||||
9 | Wrong answer | 3ms | 3232 KiB | ||||
10 | Wrong answer | 3ms | 3304 KiB | ||||
11 | Wrong answer | 3ms | 3460 KiB | ||||
12 | Wrong answer | 3ms | 3552 KiB | ||||
13 | Wrong answer | 3ms | 3688 KiB | ||||
14 | Wrong answer | 3ms | 3828 KiB | ||||
15 | Wrong answer | 3ms | 3780 KiB | ||||
16 | Wrong answer | 3ms | 3912 KiB | ||||
subtask4 | 0/19 | ||||||
17 | Wrong answer | 3ms | 4040 KiB | ||||
18 | Wrong answer | 3ms | 4152 KiB | ||||
19 | Wrong answer | 3ms | 4060 KiB | ||||
20 | Wrong answer | 3ms | 4208 KiB | ||||
subtask5 | 0/30 | ||||||
21 | Wrong answer | 8ms | 4656 KiB | ||||
22 | Wrong answer | 8ms | 4908 KiB | ||||
23 | Wrong answer | 8ms | 5156 KiB | ||||
24 | Wrong answer | 8ms | 5412 KiB | ||||
25 | Wrong answer | 8ms | 5648 KiB | ||||
26 | Wrong answer | 8ms | 5900 KiB | ||||
27 | Wrong answer | 7ms | 6256 KiB | ||||
28 | Wrong answer | 3ms | 6112 KiB |