Submission #5620958


Source Code Expand

Copy
#include<bits/stdc++.h>
using namespace std;

int main()
{
  int n;
  cin >> n;
  vector<int> a(n);
  int i;
  int pat = 1;
  int sub = 1;
  for(i = 0; i < n; i++)
  {
    cin >> a.at(i);
    pat *= 3;
    if(a.at(i)%2 == 0)sub *= 2;
  }
  cout << pat - sub << endl;
}

Submission Info

Submission Time
Task B - Similar Arrays
User nhara551
Language C++14 (GCC 5.4.1)
Score 200
Code Size 286 Byte
Status
Exec Time 1 ms
Memory 256 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 subtask0_0.txt, subtask0_1.txt, subtask0_2.txt, subtask0_3.txt
All 200 / 200 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, subtask0_0.txt, subtask0_1.txt, subtask0_2.txt, subtask0_3.txt
Case Name Status Exec Time Memory
01.txt 1 ms 256 KB
02.txt 1 ms 256 KB
03.txt 1 ms 256 KB
04.txt 1 ms 256 KB
05.txt 1 ms 256 KB
06.txt 1 ms 256 KB
07.txt 1 ms 256 KB
subtask0_0.txt 1 ms 256 KB
subtask0_1.txt 1 ms 256 KB
subtask0_2.txt 1 ms 256 KB
subtask0_3.txt 1 ms 256 KB