Submission #1142477

#TimeUsernameProblemLanguageResultExecution timeMemory
1142477vikofazLongest Trip (IOI23_longesttrip)C++20
Compilation error
0 ms0 KiB
#include "longesttrip.h" #include <bits/stdc++.h> using namespace std; std::vector<int> longest_trip(int N, int D) { vector<int> vec(N); for(int 1=0;i<n;i++){ vec[i] = i; } return vec; }

Compilation message (stderr)

longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:8:13: error: expected unqualified-id before numeric constant
    8 |     for(int 1=0;i<n;i++){
      |             ^
longesttrip.cpp:8:12: error: expected ';' before numeric constant
    8 |     for(int 1=0;i<n;i++){
      |            ^~
      |            ;
longesttrip.cpp:8:13: error: lvalue required as left operand of assignment
    8 |     for(int 1=0;i<n;i++){
      |             ^
longesttrip.cpp:8:19: error: 'n' was not declared in this scope
    8 |     for(int 1=0;i<n;i++){
      |                   ^
longesttrip.cpp:8:17: error: 'i' was not declared in this scope
    8 |     for(int 1=0;i<n;i++){
      |                 ^
longesttrip.cpp:8:20: error: expected ')' before ';' token
    8 |     for(int 1=0;i<n;i++){
      |        ~           ^
      |                    )
longesttrip.cpp:8:21: error: 'i' was not declared in this scope
    8 |     for(int 1=0;i<n;i++){
      |                     ^