Submission #839241

# Submission time Handle Problem Language Result Execution time Memory
839241 2023-08-29T10:27:02 Z SalihSahin Packing Biscuits (IOI20_biscuits) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#define pb push_back
#define fastio cin.tie(0); ios_base::sync_with_stdio(false);
#define endl "\n"
#define int long long

typedef long long ll;
using namespace std;

const int N = 501;
const int mod = 998244353;
const ll inf = 2e18 + 7;

int32_t main(){
  fastio;
  int q;
  cin>>q;
  while(q--){
    int k, x;
    cin>>k>>x;
    vector<int> a(k + 10);
    for(int i = 0; i < k; i++){
        cin>>a[i];
        int cnt = (a[i]-1)/2;
        a[i] -= cnt * 2;
        a[i+1] += cnt;
    }
    int s = 0;
    for(int i = 0; i <= k; i++){
        s += (a[i] > 0);
    }
    cout<<(1 << s)<<endl;
  }
  return 0;
}

Compilation message

/usr/bin/ld: /tmp/ccdzEaW0.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cckYnJR1.o:biscuits.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccdzEaW0.o: in function `main':
grader.cpp:(.text.startup+0x48b): undefined reference to `count_tastiness(long long, std::vector<long long, std::allocator<long long> >)'
collect2: error: ld returned 1 exit status