Submission #1359484

#TimeUsernameProblemLanguageResultExecution timeMemory
1359484ramez-hammadHack (APIO25_hack)C++20
Compilation error
0 ms0 KiB
#include "hack.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int hack() {
    collisions({0});
    for (ll i=1;i<500,000;i++)
        if (collisions(i})) return i; 
    return 5e5;
}

Compilation message (stderr)

hack.cpp: In function 'int hack()':
hack.cpp:8:25: error: expected ')' before '}' token
    8 |         if (collisions(i})) return i;
      |                       ~ ^
      |                         )
hack.cpp:8:25: error: expected ')' before '}' token
    8 |         if (collisions(i})) return i;
      |            ~            ^
      |                         )
hack.cpp:8:25: error: expected primary-expression before '}' token
hack.cpp:8:25: warning: no return statement in function returning non-void [-Wreturn-type]
hack.cpp: At global scope:
hack.cpp:8:26: error: expected unqualified-id before ')' token
    8 |         if (collisions(i})) return i;
      |                          ^
hack.cpp:9:5: error: expected unqualified-id before 'return'
    9 |     return 5e5;
      |     ^~~~~~
hack.cpp:10:1: error: expected declaration before '}' token
   10 | }
      | ^