54192023-05-17 09:28:33TortelliniJrTáblajátékcpp17Wrong answer 0/503ms3868 KiB

#include <iostream>
#include <vector>
#include <array>
#include <cmath>

using namespace std;

int main()
{
    int n, s, o, j;
    cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> j;
		switch (j)
		{
		case 0:
			s++;
			o *= 2, o--;
			break;
		case 1:
			s++, o *= 2;
			break;
		case 2:
			s--;
			o = ceil(o / 2);
		case 3:
			o--;
		case 4:
			o++;
		}
	}
	cout << s << endl;
	cout << o << endl;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/03ms1748 KiB
2Wrong answer0/03ms1924 KiB
3Wrong answer0/33ms2136 KiB
4Wrong answer0/33ms2352 KiB
5Wrong answer0/32ms2428 KiB
6Wrong answer0/33ms2556 KiB
7Wrong answer0/33ms2772 KiB
8Wrong answer0/33ms2852 KiB
9Wrong answer0/32ms2860 KiB
10Wrong answer0/33ms3008 KiB
11Wrong answer0/33ms3092 KiB
12Wrong answer0/33ms3332 KiB
13Wrong answer0/43ms3416 KiB
14Wrong answer0/43ms3464 KiB
15Wrong answer0/43ms3424 KiB
16Wrong answer0/43ms3696 KiB
17Wrong answer0/43ms3868 KiB