# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
635961 | 2022-08-27T13:21:05 Z | Cross_Ratio | Super Dango Maker (JOI22_dango3) | C++17 | 844 ms | 712 KB |
#include "dango3.h" #include <bits/stdc++.h> using namespace std; int Query(const vector<int>&); void Answer(const vector<int>&); void solve(int N, vector<int> V) { if(V.size()==0) return; if(V.size()==N) { Answer(V); return; } int M = V.size() / N; int mid = (M / 2); int i, j; vector<int> V1, V2; while(V.size()) { int k = V.back(); V.pop_back(); for(int n : V1) V.push_back(n); int k2 = Query(V); for(int n : V1) V.pop_back(); if(k2 < mid) { V1.push_back(k); } else V2.push_back(k); } solve(N, V1); solve(N, V2); } void Solve(int N, int M) { int i, j; vector<int> V; for(i=1;i<=N*M;i++) V.push_back(i); //random_shuffle(V.begin(),V.end()); solve(N, V); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 340 KB | Output is correct |
2 | Correct | 0 ms | 340 KB | Output is correct |
3 | Correct | 0 ms | 340 KB | Output is correct |
4 | Correct | 0 ms | 340 KB | Output is correct |
5 | Correct | 0 ms | 340 KB | Output is correct |
6 | Correct | 0 ms | 340 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 340 KB | Output is correct |
2 | Correct | 6 ms | 340 KB | Output is correct |
3 | Correct | 9 ms | 372 KB | Output is correct |
4 | Correct | 9 ms | 368 KB | Output is correct |
5 | Correct | 7 ms | 376 KB | Output is correct |
6 | Correct | 7 ms | 340 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 155 ms | 588 KB | Output is correct |
2 | Correct | 159 ms | 460 KB | Output is correct |
3 | Correct | 216 ms | 424 KB | Output is correct |
4 | Correct | 208 ms | 444 KB | Output is correct |
5 | Correct | 176 ms | 416 KB | Output is correct |
6 | Correct | 169 ms | 480 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 686 ms | 604 KB | Output is correct |
2 | Correct | 716 ms | 712 KB | Output is correct |
3 | Correct | 844 ms | 696 KB | Output is correct |
4 | Correct | 834 ms | 636 KB | Output is correct |
5 | Correct | 631 ms | 596 KB | Output is correct |
6 | Correct | 607 ms | 528 KB | Output is correct |