답안 #72791

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
72791 2018-08-27T00:23:47 Z dmfr Detecting Molecules (IOI16_molecules) C++11
31 / 100
1000 ms 5272 KB
#include "molecules.h"

#include <map>
#include <deque>
#include <vector>

#include <algorithm>

//#include <iostream>

using namespace std;

typedef pair<int,int> pii;

/*
4 15 17
6 8 8 7
=>2
=>2 3

4 14 15
5 5 6 6
=>0

4 10 20
15 17 16 18
=>1
=>18

4 0 0
0 0 0 0

*/

std::vector<int> find_subset(int l, int u, std::vector<int> w) {
    const int& N = w.size();

    std::vector<pii> wVtr(N);
    for(int i = 0; i < N; ++i)
        wVtr[i] = pii(w[i], i);

    std::sort(wVtr.begin(), wVtr.end());
    while(!wVtr.empty() && wVtr.front().first > u) wVtr.pop_back();
    if(wVtr.empty())                      return std::vector<int>(0);
    if(l <= wVtr.back().first && wVtr.back().first <= u) return std::vector<int>(1,wVtr.back().second);
    std::reverse(wVtr.begin(),wVtr.end());

//    cout << "w:";
//    for(const auto& i:w) cout << i << " ";
//    cout << endl;

    int UpperBound = u;
    std::vector<int> LowerBound(N);
    LowerBound[N-1] = l;
    for(int i = N-2; i >= 0; --i)
        LowerBound[i] = std::max(LowerBound[i+1] - wVtr[i+1].first, 0);

//    cout << "LowerBound:";
//    for(const auto& i:LowerBound) cout << i << " ";
//    cout << endl;

    std::map<int,std::deque<int>> PossibleNumbers;
    PossibleNumbers[0] = deque<int>();
    std::deque<std::pair<int,std::deque<int>>> ToInsert;
    for(int i = 0; i < N; ++i){
        const pii& w_i = wVtr[i];
        const int& LowerBound_i = LowerBound[i];
        for(const auto& n:PossibleNumbers)
            if(LowerBound_i <= n.first+w_i.first && n.first+w_i.first <= UpperBound){
                ToInsert.push_back(n);
                ToInsert.back().first += w_i.first;
                ToInsert.back().second.push_back(w_i.second);
            }
        while(!ToInsert.empty()){
            PossibleNumbers[ToInsert.back().first] = ToInsert.back().second;
            ToInsert.pop_back();
        }

//        cout << "PossibleNumbers (before purge):" << endl;
//        for(const auto& n:PossibleNumbers){
//            cout << n.first << ": ";
//            for(const auto& m:n.second) cout << m << " ";
//            cout << endl;
//        }

        while(!PossibleNumbers.empty() && PossibleNumbers.begin()->first < LowerBound_i)
            PossibleNumbers.erase(PossibleNumbers.begin());

//        cout << "PossibleNumbers (after purge):" << endl;
//        for(const auto& n:PossibleNumbers){
//            cout << n.first << ": ";
//            for(const auto& m:n.second) cout << m << " ";
//            cout << endl;
//        }cout << endl;

        if(PossibleNumbers.empty())
            return std::vector<int>(0);
        const auto& W = PossibleNumbers.rbegin();
        if(l <= W->first && W->first <= u)
            return std::vector<int>(W->second.begin(),W->second.end());

    }


    return std::vector<int>(0);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 248 KB OK (n = 1, answer = NO)
2 Correct 2 ms 356 KB OK (n = 1, answer = NO)
3 Correct 2 ms 432 KB OK (n = 1, answer = YES)
4 Correct 3 ms 488 KB OK (n = 2, answer = YES)
5 Correct 2 ms 488 KB OK (n = 2, answer = YES)
6 Correct 2 ms 488 KB OK (n = 3, answer = YES)
7 Correct 2 ms 488 KB OK (n = 3, answer = YES)
8 Correct 2 ms 488 KB OK (n = 3, answer = YES)
9 Correct 2 ms 516 KB OK (n = 3, answer = YES)
10 Correct 2 ms 516 KB OK (n = 3, answer = YES)
11 Correct 2 ms 516 KB OK (n = 3, answer = YES)
12 Correct 2 ms 516 KB OK (n = 3, answer = YES)
13 Correct 2 ms 516 KB OK (n = 3, answer = NO)
14 Correct 2 ms 516 KB OK (n = 3, answer = YES)
15 Correct 2 ms 516 KB OK (n = 3, answer = YES)
16 Correct 2 ms 516 KB OK (n = 3, answer = NO)
17 Correct 2 ms 516 KB OK (n = 3, answer = NO)
18 Correct 2 ms 516 KB OK (n = 100, answer = NO)
19 Correct 3 ms 632 KB OK (n = 100, answer = YES)
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 632 KB OK (n = 12, answer = YES)
2 Correct 2 ms 632 KB OK (n = 12, answer = YES)
3 Correct 2 ms 632 KB OK (n = 12, answer = NO)
4 Correct 2 ms 632 KB OK (n = 12, answer = NO)
5 Correct 2 ms 632 KB OK (n = 12, answer = YES)
6 Correct 2 ms 632 KB OK (n = 12, answer = YES)
7 Correct 2 ms 632 KB OK (n = 12, answer = YES)
8 Correct 3 ms 632 KB OK (n = 12, answer = YES)
9 Correct 2 ms 632 KB OK (n = 6, answer = YES)
10 Correct 2 ms 632 KB OK (n = 12, answer = YES)
11 Correct 2 ms 632 KB OK (n = 100, answer = NO)
12 Correct 2 ms 632 KB OK (n = 100, answer = YES)
13 Correct 2 ms 632 KB OK (n = 100, answer = NO)
14 Correct 2 ms 632 KB OK (n = 100, answer = YES)
15 Correct 5 ms 1148 KB OK (n = 100, answer = YES)
16 Correct 2 ms 1148 KB OK (n = 100, answer = YES)
17 Correct 4 ms 1148 KB OK (n = 100, answer = YES)
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 248 KB OK (n = 1, answer = NO)
2 Correct 2 ms 356 KB OK (n = 1, answer = NO)
3 Correct 2 ms 432 KB OK (n = 1, answer = YES)
4 Correct 3 ms 488 KB OK (n = 2, answer = YES)
5 Correct 2 ms 488 KB OK (n = 2, answer = YES)
6 Correct 2 ms 488 KB OK (n = 3, answer = YES)
7 Correct 2 ms 488 KB OK (n = 3, answer = YES)
8 Correct 2 ms 488 KB OK (n = 3, answer = YES)
9 Correct 2 ms 516 KB OK (n = 3, answer = YES)
10 Correct 2 ms 516 KB OK (n = 3, answer = YES)
11 Correct 2 ms 516 KB OK (n = 3, answer = YES)
12 Correct 2 ms 516 KB OK (n = 3, answer = YES)
13 Correct 2 ms 516 KB OK (n = 3, answer = NO)
14 Correct 2 ms 516 KB OK (n = 3, answer = YES)
15 Correct 2 ms 516 KB OK (n = 3, answer = YES)
16 Correct 2 ms 516 KB OK (n = 3, answer = NO)
17 Correct 2 ms 516 KB OK (n = 3, answer = NO)
18 Correct 2 ms 516 KB OK (n = 100, answer = NO)
19 Correct 3 ms 632 KB OK (n = 100, answer = YES)
20 Correct 2 ms 632 KB OK (n = 12, answer = YES)
21 Correct 2 ms 632 KB OK (n = 12, answer = YES)
22 Correct 2 ms 632 KB OK (n = 12, answer = NO)
23 Correct 2 ms 632 KB OK (n = 12, answer = NO)
24 Correct 2 ms 632 KB OK (n = 12, answer = YES)
25 Correct 2 ms 632 KB OK (n = 12, answer = YES)
26 Correct 2 ms 632 KB OK (n = 12, answer = YES)
27 Correct 3 ms 632 KB OK (n = 12, answer = YES)
28 Correct 2 ms 632 KB OK (n = 6, answer = YES)
29 Correct 2 ms 632 KB OK (n = 12, answer = YES)
30 Correct 2 ms 632 KB OK (n = 100, answer = NO)
31 Correct 2 ms 632 KB OK (n = 100, answer = YES)
32 Correct 2 ms 632 KB OK (n = 100, answer = NO)
33 Correct 2 ms 632 KB OK (n = 100, answer = YES)
34 Correct 5 ms 1148 KB OK (n = 100, answer = YES)
35 Correct 2 ms 1148 KB OK (n = 100, answer = YES)
36 Correct 4 ms 1148 KB OK (n = 100, answer = YES)
37 Correct 4 ms 1148 KB OK (n = 28, answer = YES)
38 Correct 2 ms 1148 KB OK (n = 27, answer = YES)
39 Correct 2 ms 1148 KB OK (n = 90, answer = YES)
40 Correct 2 ms 1148 KB OK (n = 100, answer = YES)
41 Correct 2 ms 1148 KB OK (n = 100, answer = YES)
42 Correct 2 ms 1148 KB OK (n = 10, answer = YES)
43 Correct 11 ms 1532 KB OK (n = 100, answer = YES)
44 Correct 2 ms 1532 KB OK (n = 100, answer = YES)
45 Correct 2 ms 1532 KB OK (n = 100, answer = YES)
46 Correct 3 ms 1532 KB OK (n = 100, answer = YES)
47 Correct 2 ms 1532 KB OK (n = 100, answer = NO)
48 Correct 2 ms 1532 KB OK (n = 100, answer = NO)
49 Correct 3 ms 1532 KB OK (n = 100, answer = NO)
50 Correct 12 ms 1532 KB OK (n = 100, answer = YES)
51 Correct 10 ms 1916 KB OK (n = 100, answer = YES)
52 Correct 3 ms 1916 KB OK (n = 100, answer = YES)
53 Correct 2 ms 1916 KB OK (n = 100, answer = YES)
54 Correct 2 ms 1916 KB OK (n = 100, answer = YES)
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 248 KB OK (n = 1, answer = NO)
2 Correct 2 ms 356 KB OK (n = 1, answer = NO)
3 Correct 2 ms 432 KB OK (n = 1, answer = YES)
4 Correct 3 ms 488 KB OK (n = 2, answer = YES)
5 Correct 2 ms 488 KB OK (n = 2, answer = YES)
6 Correct 2 ms 488 KB OK (n = 3, answer = YES)
7 Correct 2 ms 488 KB OK (n = 3, answer = YES)
8 Correct 2 ms 488 KB OK (n = 3, answer = YES)
9 Correct 2 ms 516 KB OK (n = 3, answer = YES)
10 Correct 2 ms 516 KB OK (n = 3, answer = YES)
11 Correct 2 ms 516 KB OK (n = 3, answer = YES)
12 Correct 2 ms 516 KB OK (n = 3, answer = YES)
13 Correct 2 ms 516 KB OK (n = 3, answer = NO)
14 Correct 2 ms 516 KB OK (n = 3, answer = YES)
15 Correct 2 ms 516 KB OK (n = 3, answer = YES)
16 Correct 2 ms 516 KB OK (n = 3, answer = NO)
17 Correct 2 ms 516 KB OK (n = 3, answer = NO)
18 Correct 2 ms 516 KB OK (n = 100, answer = NO)
19 Correct 3 ms 632 KB OK (n = 100, answer = YES)
20 Correct 2 ms 632 KB OK (n = 12, answer = YES)
21 Correct 2 ms 632 KB OK (n = 12, answer = YES)
22 Correct 2 ms 632 KB OK (n = 12, answer = NO)
23 Correct 2 ms 632 KB OK (n = 12, answer = NO)
24 Correct 2 ms 632 KB OK (n = 12, answer = YES)
25 Correct 2 ms 632 KB OK (n = 12, answer = YES)
26 Correct 2 ms 632 KB OK (n = 12, answer = YES)
27 Correct 3 ms 632 KB OK (n = 12, answer = YES)
28 Correct 2 ms 632 KB OK (n = 6, answer = YES)
29 Correct 2 ms 632 KB OK (n = 12, answer = YES)
30 Correct 2 ms 632 KB OK (n = 100, answer = NO)
31 Correct 2 ms 632 KB OK (n = 100, answer = YES)
32 Correct 2 ms 632 KB OK (n = 100, answer = NO)
33 Correct 2 ms 632 KB OK (n = 100, answer = YES)
34 Correct 5 ms 1148 KB OK (n = 100, answer = YES)
35 Correct 2 ms 1148 KB OK (n = 100, answer = YES)
36 Correct 4 ms 1148 KB OK (n = 100, answer = YES)
37 Correct 4 ms 1148 KB OK (n = 28, answer = YES)
38 Correct 2 ms 1148 KB OK (n = 27, answer = YES)
39 Correct 2 ms 1148 KB OK (n = 90, answer = YES)
40 Correct 2 ms 1148 KB OK (n = 100, answer = YES)
41 Correct 2 ms 1148 KB OK (n = 100, answer = YES)
42 Correct 2 ms 1148 KB OK (n = 10, answer = YES)
43 Correct 11 ms 1532 KB OK (n = 100, answer = YES)
44 Correct 2 ms 1532 KB OK (n = 100, answer = YES)
45 Correct 2 ms 1532 KB OK (n = 100, answer = YES)
46 Correct 3 ms 1532 KB OK (n = 100, answer = YES)
47 Correct 2 ms 1532 KB OK (n = 100, answer = NO)
48 Correct 2 ms 1532 KB OK (n = 100, answer = NO)
49 Correct 3 ms 1532 KB OK (n = 100, answer = NO)
50 Correct 12 ms 1532 KB OK (n = 100, answer = YES)
51 Correct 10 ms 1916 KB OK (n = 100, answer = YES)
52 Correct 3 ms 1916 KB OK (n = 100, answer = YES)
53 Correct 2 ms 1916 KB OK (n = 100, answer = YES)
54 Correct 2 ms 1916 KB OK (n = 100, answer = YES)
55 Correct 109 ms 2432 KB OK (n = 10000, answer = YES)
56 Correct 37 ms 2432 KB OK (n = 10000, answer = YES)
57 Correct 673 ms 2432 KB OK (n = 10000, answer = YES)
58 Correct 136 ms 2432 KB OK (n = 10000, answer = YES)
59 Correct 6 ms 2432 KB OK (n = 10000, answer = YES)
60 Correct 61 ms 2432 KB OK (n = 10000, answer = YES)
61 Correct 132 ms 2432 KB OK (n = 10000, answer = NO)
62 Correct 4 ms 2432 KB OK (n = 10000, answer = YES)
63 Correct 5 ms 2432 KB OK (n = 10000, answer = NO)
64 Correct 4 ms 2432 KB OK (n = 10000, answer = YES)
65 Correct 7 ms 2432 KB OK (n = 10000, answer = YES)
66 Execution timed out 1087 ms 5272 KB Time limit exceeded
67 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 248 KB OK (n = 1, answer = NO)
2 Correct 2 ms 356 KB OK (n = 1, answer = NO)
3 Correct 2 ms 432 KB OK (n = 1, answer = YES)
4 Correct 3 ms 488 KB OK (n = 2, answer = YES)
5 Correct 2 ms 488 KB OK (n = 2, answer = YES)
6 Correct 2 ms 488 KB OK (n = 3, answer = YES)
7 Correct 2 ms 488 KB OK (n = 3, answer = YES)
8 Correct 2 ms 488 KB OK (n = 3, answer = YES)
9 Correct 2 ms 516 KB OK (n = 3, answer = YES)
10 Correct 2 ms 516 KB OK (n = 3, answer = YES)
11 Correct 2 ms 516 KB OK (n = 3, answer = YES)
12 Correct 2 ms 516 KB OK (n = 3, answer = YES)
13 Correct 2 ms 516 KB OK (n = 3, answer = NO)
14 Correct 2 ms 516 KB OK (n = 3, answer = YES)
15 Correct 2 ms 516 KB OK (n = 3, answer = YES)
16 Correct 2 ms 516 KB OK (n = 3, answer = NO)
17 Correct 2 ms 516 KB OK (n = 3, answer = NO)
18 Correct 2 ms 516 KB OK (n = 100, answer = NO)
19 Correct 3 ms 632 KB OK (n = 100, answer = YES)
20 Correct 2 ms 632 KB OK (n = 12, answer = YES)
21 Correct 2 ms 632 KB OK (n = 12, answer = YES)
22 Correct 2 ms 632 KB OK (n = 12, answer = NO)
23 Correct 2 ms 632 KB OK (n = 12, answer = NO)
24 Correct 2 ms 632 KB OK (n = 12, answer = YES)
25 Correct 2 ms 632 KB OK (n = 12, answer = YES)
26 Correct 2 ms 632 KB OK (n = 12, answer = YES)
27 Correct 3 ms 632 KB OK (n = 12, answer = YES)
28 Correct 2 ms 632 KB OK (n = 6, answer = YES)
29 Correct 2 ms 632 KB OK (n = 12, answer = YES)
30 Correct 2 ms 632 KB OK (n = 100, answer = NO)
31 Correct 2 ms 632 KB OK (n = 100, answer = YES)
32 Correct 2 ms 632 KB OK (n = 100, answer = NO)
33 Correct 2 ms 632 KB OK (n = 100, answer = YES)
34 Correct 5 ms 1148 KB OK (n = 100, answer = YES)
35 Correct 2 ms 1148 KB OK (n = 100, answer = YES)
36 Correct 4 ms 1148 KB OK (n = 100, answer = YES)
37 Correct 4 ms 1148 KB OK (n = 28, answer = YES)
38 Correct 2 ms 1148 KB OK (n = 27, answer = YES)
39 Correct 2 ms 1148 KB OK (n = 90, answer = YES)
40 Correct 2 ms 1148 KB OK (n = 100, answer = YES)
41 Correct 2 ms 1148 KB OK (n = 100, answer = YES)
42 Correct 2 ms 1148 KB OK (n = 10, answer = YES)
43 Correct 11 ms 1532 KB OK (n = 100, answer = YES)
44 Correct 2 ms 1532 KB OK (n = 100, answer = YES)
45 Correct 2 ms 1532 KB OK (n = 100, answer = YES)
46 Correct 3 ms 1532 KB OK (n = 100, answer = YES)
47 Correct 2 ms 1532 KB OK (n = 100, answer = NO)
48 Correct 2 ms 1532 KB OK (n = 100, answer = NO)
49 Correct 3 ms 1532 KB OK (n = 100, answer = NO)
50 Correct 12 ms 1532 KB OK (n = 100, answer = YES)
51 Correct 10 ms 1916 KB OK (n = 100, answer = YES)
52 Correct 3 ms 1916 KB OK (n = 100, answer = YES)
53 Correct 2 ms 1916 KB OK (n = 100, answer = YES)
54 Correct 2 ms 1916 KB OK (n = 100, answer = YES)
55 Correct 109 ms 2432 KB OK (n = 10000, answer = YES)
56 Correct 37 ms 2432 KB OK (n = 10000, answer = YES)
57 Correct 673 ms 2432 KB OK (n = 10000, answer = YES)
58 Correct 136 ms 2432 KB OK (n = 10000, answer = YES)
59 Correct 6 ms 2432 KB OK (n = 10000, answer = YES)
60 Correct 61 ms 2432 KB OK (n = 10000, answer = YES)
61 Correct 132 ms 2432 KB OK (n = 10000, answer = NO)
62 Correct 4 ms 2432 KB OK (n = 10000, answer = YES)
63 Correct 5 ms 2432 KB OK (n = 10000, answer = NO)
64 Correct 4 ms 2432 KB OK (n = 10000, answer = YES)
65 Correct 7 ms 2432 KB OK (n = 10000, answer = YES)
66 Execution timed out 1087 ms 5272 KB Time limit exceeded
67 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 248 KB OK (n = 1, answer = NO)
2 Correct 2 ms 356 KB OK (n = 1, answer = NO)
3 Correct 2 ms 432 KB OK (n = 1, answer = YES)
4 Correct 3 ms 488 KB OK (n = 2, answer = YES)
5 Correct 2 ms 488 KB OK (n = 2, answer = YES)
6 Correct 2 ms 488 KB OK (n = 3, answer = YES)
7 Correct 2 ms 488 KB OK (n = 3, answer = YES)
8 Correct 2 ms 488 KB OK (n = 3, answer = YES)
9 Correct 2 ms 516 KB OK (n = 3, answer = YES)
10 Correct 2 ms 516 KB OK (n = 3, answer = YES)
11 Correct 2 ms 516 KB OK (n = 3, answer = YES)
12 Correct 2 ms 516 KB OK (n = 3, answer = YES)
13 Correct 2 ms 516 KB OK (n = 3, answer = NO)
14 Correct 2 ms 516 KB OK (n = 3, answer = YES)
15 Correct 2 ms 516 KB OK (n = 3, answer = YES)
16 Correct 2 ms 516 KB OK (n = 3, answer = NO)
17 Correct 2 ms 516 KB OK (n = 3, answer = NO)
18 Correct 2 ms 516 KB OK (n = 100, answer = NO)
19 Correct 3 ms 632 KB OK (n = 100, answer = YES)
20 Correct 2 ms 632 KB OK (n = 12, answer = YES)
21 Correct 2 ms 632 KB OK (n = 12, answer = YES)
22 Correct 2 ms 632 KB OK (n = 12, answer = NO)
23 Correct 2 ms 632 KB OK (n = 12, answer = NO)
24 Correct 2 ms 632 KB OK (n = 12, answer = YES)
25 Correct 2 ms 632 KB OK (n = 12, answer = YES)
26 Correct 2 ms 632 KB OK (n = 12, answer = YES)
27 Correct 3 ms 632 KB OK (n = 12, answer = YES)
28 Correct 2 ms 632 KB OK (n = 6, answer = YES)
29 Correct 2 ms 632 KB OK (n = 12, answer = YES)
30 Correct 2 ms 632 KB OK (n = 100, answer = NO)
31 Correct 2 ms 632 KB OK (n = 100, answer = YES)
32 Correct 2 ms 632 KB OK (n = 100, answer = NO)
33 Correct 2 ms 632 KB OK (n = 100, answer = YES)
34 Correct 5 ms 1148 KB OK (n = 100, answer = YES)
35 Correct 2 ms 1148 KB OK (n = 100, answer = YES)
36 Correct 4 ms 1148 KB OK (n = 100, answer = YES)
37 Correct 4 ms 1148 KB OK (n = 28, answer = YES)
38 Correct 2 ms 1148 KB OK (n = 27, answer = YES)
39 Correct 2 ms 1148 KB OK (n = 90, answer = YES)
40 Correct 2 ms 1148 KB OK (n = 100, answer = YES)
41 Correct 2 ms 1148 KB OK (n = 100, answer = YES)
42 Correct 2 ms 1148 KB OK (n = 10, answer = YES)
43 Correct 11 ms 1532 KB OK (n = 100, answer = YES)
44 Correct 2 ms 1532 KB OK (n = 100, answer = YES)
45 Correct 2 ms 1532 KB OK (n = 100, answer = YES)
46 Correct 3 ms 1532 KB OK (n = 100, answer = YES)
47 Correct 2 ms 1532 KB OK (n = 100, answer = NO)
48 Correct 2 ms 1532 KB OK (n = 100, answer = NO)
49 Correct 3 ms 1532 KB OK (n = 100, answer = NO)
50 Correct 12 ms 1532 KB OK (n = 100, answer = YES)
51 Correct 10 ms 1916 KB OK (n = 100, answer = YES)
52 Correct 3 ms 1916 KB OK (n = 100, answer = YES)
53 Correct 2 ms 1916 KB OK (n = 100, answer = YES)
54 Correct 2 ms 1916 KB OK (n = 100, answer = YES)
55 Correct 109 ms 2432 KB OK (n = 10000, answer = YES)
56 Correct 37 ms 2432 KB OK (n = 10000, answer = YES)
57 Correct 673 ms 2432 KB OK (n = 10000, answer = YES)
58 Correct 136 ms 2432 KB OK (n = 10000, answer = YES)
59 Correct 6 ms 2432 KB OK (n = 10000, answer = YES)
60 Correct 61 ms 2432 KB OK (n = 10000, answer = YES)
61 Correct 132 ms 2432 KB OK (n = 10000, answer = NO)
62 Correct 4 ms 2432 KB OK (n = 10000, answer = YES)
63 Correct 5 ms 2432 KB OK (n = 10000, answer = NO)
64 Correct 4 ms 2432 KB OK (n = 10000, answer = YES)
65 Correct 7 ms 2432 KB OK (n = 10000, answer = YES)
66 Execution timed out 1087 ms 5272 KB Time limit exceeded
67 Halted 0 ms 0 KB -