Submission #1205649

#TimeUsernameProblemLanguageResultExecution timeMemory
1205649bongoboltoHack (APIO25_hack)C++20
Compilation error
0 ms0 KiB
#include "hack.h"
#include <iostream>
#include <vector>
#include <map>
using namespace std;


int hack()
{
    int n = 1;
    for (int i = 0; i < 500000; ++i)
    {
        // vector<long long> vec = {n};
        if(collisions(vector<long long> vec = {n}) != 0LL)    
        {
            cout<<n<<endl;
        }
        n++;
    }
}

Compilation message (stderr)

hack.cpp: In function 'int hack()':
hack.cpp:14:41: error: expected primary-expression before 'vec'
   14 |         if(collisions(vector<long long> vec = {n}) != 0LL)
      |                                         ^~~
hack.cpp:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^