Submission #898339

# Submission time Handle Problem Language Result Execution time Memory
898339 2024-01-04T14:05:57 Z 8pete8 Meetings (JOI19_meetings) C++17
0 / 100
1722 ms 5096 KB
#include "meetings.h"
#include<iostream>
#include<stack>
#include<map>
#include<vector>
#include<string>
#include<unordered_map>
#include <queue>
#include<cstring>
#include<float.h>
#include<limits.h>
#include <cassert>
#include<cmath>
#include<set>
#include<algorithm>
#include <iomanip>
#include<numeric> //gcd(a,b)
#include<bitset>
using namespace std;
#define ll long long
#define f first
#define endl "\n"
#define s second
#define pii pair<int,int>
#define ppii pair<int,pii>
#define vi vector<int>
#define pb push_back
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define F(n) for(int i=0;i<n;i++)
#define lb lower_bound
#define ub upper_bound

using namespace std;
//#define int long long
//#define double long double
const int mod=998244353,mxn=2e3,lg=22;//inf=1e18,minf=-1e18,Mxn=100000;
int q[mxn+10][mxn+10];
void Solve(int n){
  vector<pii>v(n-1,{0,0});
  for(int i=1;i<n;i++){
    v[i-1].s=i;
    for(int j=1;j<i;j++){
      q[i][j]=Query(0,j,i);
      q[j][i]=q[i][j];
      if(q[i][j])v[q[i][j]-1].f++;
    }
  }
  sort(rall(v));
  for(int i=0;i<n-1;i++){
    int p=0;
    for(int j=0;j<i;j++)if(q[v[i].s][v[j].s]==v[j].s)p=v[j].s;
    Bridge(min(p,v[i].s),max(p,v[i].s));
  }
}
# Verdict Execution time Memory Grader output
1 Correct 1 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 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 0 ms 344 KB Output is correct
10 Incorrect 0 ms 344 KB Wrong Answer [4]
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 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 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 0 ms 344 KB Output is correct
10 Incorrect 0 ms 344 KB Wrong Answer [4]
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 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 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 0 ms 344 KB Output is correct
10 Incorrect 0 ms 344 KB Wrong Answer [4]
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1722 ms 5096 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -