Submission #931205

#TimeUsernameProblemLanguageResultExecution timeMemory
931205parlimoosSecret (JOI14_secret)C++14
Compilation error
0 ms0 KiB
//Be Name KHODA
#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#include "secret.h"
using namespace std;

int n;
vector<int> a;

void Init(int N , int A[]){
  n = N;
  for(int i = 0 ; i < n ; i++) a.pb(A[i]);
}
int Query(int L , int R){
  int res = a[L];
  for(int i = L + 1 ; i <= R ; i++) res = Secret(res , a[i]);
  return res;
}

Compilation message (stderr)

secret.cpp: In function 'void Init(int, int*)':
secret.cpp:12:34: error: 'class std::vector<int>' has no member named 'pb'
   12 |   for(int i = 0 ; i < n ; i++) a.pb(A[i]);
      |                                  ^~