Submission #1019864

#TimeUsernameProblemLanguageResultExecution timeMemory
1019864vjudge1Detecting Molecules (IOI16_molecules)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

int[] find_subset(int l, int u, int[] w){
    int div=u/w[0];
    int[] result;
    if(div*w[0]>l&&div<=n){
        for(int i=0; i<div; ++i){
            result[i]=1;
        }
    }
    return result;
}

Compilation message (stderr)

molecules.cpp:4:4: error: structured binding declaration cannot have type 'int'
    4 | int[] find_subset(int l, int u, int[] w){
      |    ^~
molecules.cpp:4:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
molecules.cpp:4:4: error: empty structured binding declaration
molecules.cpp:4:7: error: expected initializer before 'find_subset'
    4 | int[] find_subset(int l, int u, int[] w){
      |       ^~~~~~~~~~~