Submission #342535

# Submission time Handle Problem Language Result Execution time Memory
342535 2021-01-02T10:40:07 Z blue ICC (CEOI16_icc) C++11
7 / 100
460 ms 620 KB
#include "icc.h"
#include <set>
using namespace std;

void run(int N)
{
    set<int> edge[N+1];
    int a[1], b[1];

    bool flag = 0;

    for(int i = 1; i <= N-1; i++)
    {
        flag = 0;
        for(int p = 1; p <= N; p++)
        {
            for(int q = p+1; q <= N; q++)
            {
                if(edge[p].find(q) != edge[p].end()) continue;
                a[0] = p;
                b[0] = q;
                if(query(1, 1, a, b) == 0) continue;
                edge[p].insert(q);
                edge[q].insert(p);
                setRoad(p, q);
                flag = 1;
                break;
            }
            if(flag) break;
        }
    }
}
# Verdict Execution time Memory Grader output
1 Correct 60 ms 492 KB Ok! 1015 queries used.
2 Correct 63 ms 620 KB Ok! 1010 queries used.
# Verdict Execution time Memory Grader output
1 Incorrect 351 ms 620 KB Number of queries more than 5000 out of 2500
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 460 ms 492 KB Number of queries more than 4500 out of 2250
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 435 ms 568 KB Number of queries more than 4000 out of 2000
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 383 ms 568 KB Number of queries more than 3550 out of 1775
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 366 ms 620 KB Number of queries more than 3250 out of 1625
2 Halted 0 ms 0 KB -