Submission #915630

# Submission time Handle Problem Language Result Execution time Memory
915630 2024-01-24T12:08:48 Z guagua0407 Meetings (JOI19_meetings) C++17
0 / 100
1669 ms 712 KB
#include "meetings.h"
#include<bits/stdc++.h>
using namespace std;

void Solve(int n) {
    set<int> S[n];
    for(int i=1;i<n;i++){
        for(int j=i+1;j<n;j++){
            int x=Query(0,i,j);
            S[i].insert(x);
        }
    }
    queue<int> q;
    q.push(0);
    vector<bool> used(n);
    used[0]=true;
    while(!q.empty()){
        int x=q.front();
        q.pop();
        for(int i=0;i<n;i++){
            if(used[i]) continue;
            if(S[i].find(x)!=S[i].end()){
                S[i].erase(x);
            }
            if(S[i].empty() or ((int)S[i].size()==1 and *S[i].begin()==i)){
                used[i]=true;
                q.push(i);
                Bridge(min(x,i),max(x,i));
            }
        }
    }
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Incorrect 0 ms 344 KB Wrong Answer [4]
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Incorrect 0 ms 344 KB Wrong Answer [4]
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Incorrect 0 ms 344 KB Wrong Answer [4]
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1669 ms 712 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -