Submission #1054909

# Submission time Handle Problem Language Result Execution time Memory
1054909 2024-08-12T13:00:16 Z Warinchai Island Hopping (JOI24_island) C++17
2 / 100
4 ms 424 KB
#include "island.h"
#include<bits/stdc++.h>
using namespace std;
void solve(int N, int L) {
    int ar[305];
    int vis[305];
    for(int i=1;i<=N-1;i++){
        ar[i]=query(1,i);
    }
    vis[1]=1;
    for(int i=1;i<=N-1;i++){
        if(!vis[ar[i]]){
            vis[ar[i]]++;
            int cur=1;
            int x;
            while(!vis[x=query(ar[i],cur)]){
                vis[x]++;
                answer(x,ar[i]);
                cur++;
            }
            answer(x,ar[i]);
        }
    }
}
# 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
# 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 Incorrect 3 ms 424 KB Wrong Answer [7]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 344 KB Wrong Answer [7]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 4 ms 344 KB Wrong Answer [7]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 344 KB Wrong Answer [7]
2 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 Incorrect 3 ms 424 KB Wrong Answer [7]
6 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 Incorrect 4 ms 344 KB Wrong Answer [7]
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 344 KB Wrong Answer [7]
2 Halted 0 ms 0 KB -