ამოხსნების სტატუსი

ამ გვერდზე თქვენ იხილავთ გაგზავნილი ამოხსნების სტატუსს.


გაგზავნის თარიღი: 24.03.2020 18:24:03

ამოცანა: შეღებვა

მომხმარებელი: illarion

ვერდიქტი: ამოუხსნელი

შეფასება: 0 ქულა







#include <bits/stdc++.h>

using namespace std;

int x[500001];
int n, a, b;
int n_max;
int b_sum, b_max;

main () {
    cin >> n;

    n_max = 0;
    for ( int i = 1; i <= n; i++ ) {
        cin >> a >> b;

        if ( n_max < b ) {
            n_max = b;
        }#include <bits/stdc++.h>

using namespace std;

int x[500001];
int n, a, b;
int n_max;
int b_sum, b_max;

main () {
    cin >> n;

    n_max = 0;
    for ( int i = 1; i <= n; i++ ) {
        cin >> a >> b;

        for ( int j = a; j <= b; j++ ) {
            x[j] = 1 - x[j];
        }
    }

    int i = 1;
    b_max = 0;
    while ( i <= 500000 ) {
        while ( x[i] == 0 ) {
            i++;
        }

        b_sum = 0;
        while ( x[i] == 1 ) {
            b_sum ++;
            i++;
        }
        if ( b_max < b_sum ) {
            b_max = b_sum;
        }
    }
    cout << b_max;
}
PROB_cpp_UID1340PID43_3cd815/main.cpp:19:10: error: stray '#' in program
         }#include <bits/stdc++.h>
          ^
PROB_cpp_UID1340PID43_3cd815/main.cpp: In function 'int main()':
PROB_cpp_UID1340PID43_3cd815/main.cpp:19:11: error: 'include' was not declared in this scope
         }#include <bits/stdc++.h>
           ^~~~~~~
PROB_cpp_UID1340PID43_3cd815/main.cpp:19:20: error: 'bits' was not declared in this scope
         }#include <bits/stdc++.h>
                    ^~~~
PROB_cpp_UID1340PID43_3cd815/main.cpp:19:25: error: 'stdc' was not declared in this scope
         }#include <bits/stdc++.h>
                         ^~~~
PROB_cpp_UID1340PID43_3cd815/main.cpp:21:1: error: expected primary-expression before 'using'
 using namespace std;
 ^~~~~
PROB_cpp_UID1340PID43_3cd815/main.cpp:28:9: error: expected ';' before '{' token
 main () {
         ^
PROB_cpp_UID1340PID43_3cd815/main.cpp:57:1: error: expected '}' at end of input
 }
 ^
PROB_cpp_UID1340PID43_3cd815/main.cpp:57:1: error: expected '}' at end of input