제출 #1366594

#제출 시각아이디문제언어결과실행 시간메모리
1366594avahwCurrents (EGOI25_currents)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    int n, m;
    cin >> n >> m;
    vector<vector<int>> adj(n);
    for(int i = 0; i < m; i++){
        int a, b;
        cin >> a >> b;
        adj[a].push_back(b);
    }
    for(int i = 0; i < n - 1; i++){
        else{
            // go one away from the end, then switch
            cout << (n - 2 - i) + (n - 2) << " ";
        }
    }
    cout << "\n";
}

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp: In function 'int main()':
Main.cpp:16:9: error: 'else' without a previous 'if'
   16 |         else{
      |         ^~~~