답안 #921510

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
921510 2024-02-04T03:38:07 Z 1075508020060209tc Meetings (JOI19_meetings) C++14
17 / 100
2000 ms 11352 KB
#pragma GCC optimize("O3")
#include "meetings.h"
#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define X first
#define Y second
#define SZ(x) (int)(x).size()
map<vector<int>,int>mp;
int n;
int query(int a,int b,int c){
vector<int>vc={a,b,c};
sort(vc.begin(),vc.end());
if(mp[vc]){return mp[vc];}
mp[vc]=Query(vc[0],vc[1],vc[2])+1;
return mp[vc];
}

pair<int,int>slv(int st,int en){
int ret=en;
for(int i=1;i<=n;i++){
    if(i==st||i==ret){continue;}
    int v=query(st-1,i-1,ret-1);
    //v++;
    if(v==st||v==ret){continue;}
    ret=v;
}
return {min(st,ret)-1,max(st,ret)-1};
}


void Solve(int N){
set<pair<int,int>>ans;
n=N;
for(int i=1;i<=n;i++){
    for(int j=i+1;j<=n;j++){
        ans.insert(slv(i,j));
    }
}
for(auto it=ans.begin();it!=ans.end();it++){
    Bridge((*it).first, (*it).second );
}
}
/*
signed main(){


}
*/
# 결과 실행 시간 메모리 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 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 1 ms 344 KB Output is correct
9 Correct 0 ms 344 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 1 ms 344 KB Output is correct
13 Correct 1 ms 344 KB Output is correct
# 결과 실행 시간 메모리 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 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 1 ms 344 KB Output is correct
9 Correct 0 ms 344 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 1 ms 344 KB Output is correct
13 Correct 1 ms 344 KB Output is correct
14 Correct 14 ms 856 KB Output is correct
15 Correct 11 ms 856 KB Output is correct
16 Correct 10 ms 856 KB Output is correct
17 Correct 11 ms 856 KB Output is correct
18 Correct 11 ms 856 KB Output is correct
19 Correct 11 ms 856 KB Output is correct
20 Correct 9 ms 756 KB Output is correct
21 Correct 10 ms 608 KB Output is correct
22 Correct 10 ms 820 KB Output is correct
23 Correct 13 ms 1108 KB Output is correct
24 Correct 17 ms 1112 KB Output is correct
25 Correct 16 ms 1112 KB Output is correct
26 Correct 26 ms 2452 KB Output is correct
# 결과 실행 시간 메모리 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 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 1 ms 344 KB Output is correct
9 Correct 0 ms 344 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 1 ms 344 KB Output is correct
13 Correct 1 ms 344 KB Output is correct
14 Correct 14 ms 856 KB Output is correct
15 Correct 11 ms 856 KB Output is correct
16 Correct 10 ms 856 KB Output is correct
17 Correct 11 ms 856 KB Output is correct
18 Correct 11 ms 856 KB Output is correct
19 Correct 11 ms 856 KB Output is correct
20 Correct 9 ms 756 KB Output is correct
21 Correct 10 ms 608 KB Output is correct
22 Correct 10 ms 820 KB Output is correct
23 Correct 13 ms 1108 KB Output is correct
24 Correct 17 ms 1112 KB Output is correct
25 Correct 16 ms 1112 KB Output is correct
26 Correct 26 ms 2452 KB Output is correct
27 Incorrect 1807 ms 11352 KB Wrong Answer [2]
28 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3051 ms 3108 KB Time limit exceeded
2 Halted 0 ms 0 KB -