Submission #1252087

#TimeUsernameProblemLanguageResultExecution timeMemory
1252087antarbanikFinding Routers (IOI20_routers)C++20
Compilation error
0 ms0 KiB
#include "routers.h"
#include <bits/stdc++.h>
using namespace std;
#include <bits/stdc++.h>
using namespace std;
vector<int> find_routers(int l, int n, int q){
    vector<int> ans;
    ans.push_back(0);

    for(int i = 0;i<=l++i){

        int x = use_detector(i);

        if(x==1){
            if(i%2 == 0) ans.push_back(i);
            else ans.push_back(i+1);
            break;
        }

    }

    return ans;
}

Compilation message (stderr)

routers.cpp: In function 'std::vector<int> find_routers(int, int, int)':
routers.cpp:10:25: error: expected ';' before 'i'
   10 |     for(int i = 0;i<=l++i){
      |                         ^
      |                         ;