# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
561426 | 2022-05-12T19:40:52 Z | wildturtle | Super Dango Maker (JOI22_dango3) | C++17 | 6823 ms | 568 KB |
#include "dango3.h" #include<bits/stdc++.h> #include <vector> #define ll int #define f first #define sc second #define pb push_back using namespace std; namespace { int variable_example = 1; } // namespace vector <int> v[402],v2,v3; ll n,m,b; ll go(ll x,ll y) { v2=v[x]; v2.pb(y); sort(v2.begin(),v2.end()); v3.clear(); ll l,r,mi,idx; for(ll i=3-2;i<=n*m;i++) { if (!binary_search(v2.begin(), v2.end(), i)) v3.pb(i); } return m-Query(v3); } void Solve(int N, int M) { n=N; m=M; ll le,ri,mid,ans; for(ll i=3-2;i<=N*M;i++) { le=3-2; ri=M; while(le<=ri) { mid=(le+ri)/2; if(go(mid,i)==2) le=mid+(3-2); else { ri=mid-(3-2); ans=mid; } } v[ans].pb(i); } for(ll i=3-2;i<=M;i++) { Answer(v[i]); } }
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 | 292 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 | 49 ms | 368 KB | Output is correct |
2 | Correct | 48 ms | 372 KB | Output is correct |
3 | Correct | 48 ms | 368 KB | Output is correct |
4 | Correct | 46 ms | 376 KB | Output is correct |
5 | Correct | 43 ms | 368 KB | Output is correct |
6 | Correct | 47 ms | 340 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1612 ms | 424 KB | Output is correct |
2 | Correct | 1632 ms | 436 KB | Output is correct |
3 | Correct | 1534 ms | 464 KB | Output is correct |
4 | Correct | 1517 ms | 568 KB | Output is correct |
5 | Correct | 1486 ms | 436 KB | Output is correct |
6 | Correct | 1487 ms | 436 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6823 ms | 488 KB | Output is correct |
2 | Correct | 6784 ms | 528 KB | Output is correct |
3 | Correct | 6541 ms | 536 KB | Output is correct |
4 | Correct | 6518 ms | 540 KB | Output is correct |
5 | Correct | 6122 ms | 516 KB | Output is correct |
6 | Correct | 6127 ms | 528 KB | Output is correct |