답안 #1113511

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1113511 2024-11-16T17:10:46 Z imarn Island Hopping (JOI24_island) C++17
65 / 100
20 ms 604 KB
#include<bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define plx pair<ll,int>
#define f first
#define s second
#define pb push_back
#define all(x) x.begin(),x.end()
#define szz(r) (ll)r.size()
#define vi vector<int>
#define vvi vector<vi>
#define pp pair<ll,int>
#define ub(x,i) upper_bound(all(x),i)-x.begin()
using namespace std;
#include "island.h"

void solve(int N, int L) {int n=N;
    vector<int>vec;
    for(int i=1;i<=n-1;i++)vec.pb(query(1,i));
    int pr[N+1]={0};pr[1]=1;
    for(int i=2;i<=n;i++){
        int u=vec[i-2];
        for(int j=1;j<=n-1;j++){
            int v=query(u,j);
            if(!pr[v])continue;
            else {pr[u]=v;break;}
        }
    }
    for(int i=2;i<=n;i++)answer(pr[i],i);
}

# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 500 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 500 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Correct 20 ms 336 KB Output is correct
6 Correct 18 ms 336 KB Output is correct
7 Correct 18 ms 336 KB Output is correct
8 Correct 18 ms 336 KB Output is correct
9 Correct 17 ms 336 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 9 ms 336 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 14 ms 336 KB Output is correct
3 Correct 17 ms 504 KB Output is correct
4 Correct 14 ms 336 KB Output is correct
5 Correct 16 ms 336 KB Output is correct
6 Correct 15 ms 336 KB Output is correct
7 Correct 16 ms 336 KB Output is correct
8 Correct 17 ms 336 KB Output is correct
9 Correct 16 ms 336 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 17 ms 336 KB Output is correct
2 Correct 16 ms 336 KB Output is correct
3 Correct 15 ms 336 KB Output is correct
4 Correct 16 ms 336 KB Output is correct
5 Correct 20 ms 336 KB Output is correct
6 Correct 15 ms 336 KB Output is correct
7 Correct 16 ms 336 KB Output is correct
8 Correct 14 ms 336 KB Output is correct
9 Correct 13 ms 336 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 500 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Correct 20 ms 336 KB Output is correct
6 Correct 18 ms 336 KB Output is correct
7 Correct 18 ms 336 KB Output is correct
8 Correct 18 ms 336 KB Output is correct
9 Correct 17 ms 336 KB Output is correct
10 Correct 1 ms 336 KB Output is correct
11 Correct 14 ms 336 KB Output is correct
12 Correct 17 ms 504 KB Output is correct
13 Correct 14 ms 336 KB Output is correct
14 Correct 16 ms 336 KB Output is correct
15 Correct 15 ms 336 KB Output is correct
16 Correct 16 ms 336 KB Output is correct
17 Correct 17 ms 336 KB Output is correct
18 Correct 16 ms 336 KB Output is correct
19 Correct 16 ms 336 KB Output is correct
20 Correct 17 ms 604 KB Output is correct
21 Correct 14 ms 336 KB Output is correct
22 Correct 16 ms 336 KB Output is correct
23 Correct 16 ms 436 KB Output is correct
24 Correct 15 ms 336 KB Output is correct
25 Correct 16 ms 336 KB Output is correct
26 Correct 16 ms 336 KB Output is correct
27 Correct 15 ms 336 KB Output is correct
28 Correct 17 ms 500 KB Output is correct
29 Correct 17 ms 592 KB Output is correct
30 Correct 17 ms 336 KB Output is correct
31 Correct 14 ms 336 KB Output is correct
32 Correct 17 ms 336 KB Output is correct
33 Correct 14 ms 504 KB Output is correct
34 Correct 11 ms 336 KB Output is correct
35 Correct 16 ms 336 KB Output is correct
36 Correct 17 ms 336 KB Output is correct
37 Correct 18 ms 336 KB Output is correct
38 Correct 15 ms 336 KB Output is correct
39 Correct 17 ms 336 KB Output is correct
40 Correct 13 ms 336 KB Output is correct
41 Correct 18 ms 336 KB Output is correct
42 Correct 13 ms 336 KB Output is correct
43 Correct 16 ms 336 KB Output is correct
44 Correct 11 ms 336 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 500 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 17 ms 336 KB Output is correct
5 Correct 16 ms 336 KB Output is correct
6 Correct 15 ms 336 KB Output is correct
7 Correct 16 ms 336 KB Output is correct
8 Correct 20 ms 336 KB Output is correct
9 Correct 15 ms 336 KB Output is correct
10 Correct 16 ms 336 KB Output is correct
11 Correct 14 ms 336 KB Output is correct
12 Correct 13 ms 336 KB Output is correct
13 Correct 17 ms 336 KB Output is correct
14 Correct 19 ms 336 KB Output is correct
15 Correct 16 ms 336 KB Output is correct
16 Correct 16 ms 336 KB Output is correct
17 Correct 17 ms 336 KB Output is correct
18 Correct 18 ms 336 KB Output is correct
19 Correct 11 ms 336 KB Output is correct
20 Correct 15 ms 336 KB Output is correct
21 Correct 15 ms 336 KB Output is correct
22 Correct 19 ms 592 KB Output is correct
23 Correct 19 ms 336 KB Output is correct
24 Correct 17 ms 336 KB Output is correct
25 Correct 16 ms 348 KB Output is correct
26 Correct 12 ms 592 KB Output is correct
27 Correct 12 ms 336 KB Output is correct
28 Correct 15 ms 336 KB Output is correct
29 Correct 18 ms 336 KB Output is correct
30 Correct 17 ms 336 KB Output is correct
31 Correct 13 ms 336 KB Output is correct
32 Correct 15 ms 336 KB Output is correct
33 Correct 17 ms 336 KB Output is correct
34 Correct 15 ms 504 KB Output is correct
35 Correct 15 ms 592 KB Output is correct
36 Correct 15 ms 336 KB Output is correct
37 Correct 15 ms 336 KB Output is correct
38 Correct 15 ms 336 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 9 ms 336 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -