# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
892569 | 2023-12-25T14:02:06 Z | ReLice | Super Dango Maker (JOI22_dango3) | C++17 | 265 ms | 920 KB |
#include <bits/stdc++.h> #include "dango3.h" #define ll int #define str string #define ins insert #define ld long double #define pb push_back #define pf push_front #define pof pop_front() #define pob pop_back() #define lb lower_bound #define ub upper_bound #define endl "\n" #define fr first #define sc second #define mpa make_pair #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define sz size() #define bc back() #define ar array #define vll vector<ll> using namespace std;/* #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds;*/ template <class _T> bool chmin(_T &x, const _T &y){ if(x>y){ x=y; return true; } return false; } template <class _T> bool chmax(_T &x, const _T &y){ bool flag=false; if (x<y){ x=y;flag|=true; } return flag; } //#define ordered_set tree<ll, null_type,less_equal<ll>, rb_tree_tag,tree_order_statistics_node_update> void fre(string s){freopen((s+".in").c_str(),"r",stdin);freopen((s+".out").c_str(),"w",stdout);} void start(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } const ll mod=1e9+7; const ld eps=1e-9; void rec(vll v,ll m){ ll i,n=v.sz; if(m==1){ Answer(v); return; } vll nv; for(i=0;i<n;i++){ nv.pb(v[0]); v.erase(v.begin()); ll x=Query(v); if(x<m/2){ v.pb(nv.bc); nv.pob; } } rec(v,m/2); rec(nv,m-m/2); } void Solve(ll n,ll m){ vll v(n*m); iota(all(v),1); rec(v,m); } /* 1 7 1 2 2 3 3 4 4 5 3 6 6 7 2 4 1 5 7 */
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 344 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 344 KB | Output is correct |
2 | Correct | 2 ms | 348 KB | Output is correct |
3 | Correct | 3 ms | 348 KB | Output is correct |
4 | Correct | 3 ms | 348 KB | Output is correct |
5 | Correct | 3 ms | 348 KB | Output is correct |
6 | Correct | 2 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 51 ms | 564 KB | Output is correct |
2 | Correct | 49 ms | 344 KB | Output is correct |
3 | Correct | 68 ms | 536 KB | Output is correct |
4 | Correct | 68 ms | 580 KB | Output is correct |
5 | Correct | 48 ms | 572 KB | Output is correct |
6 | Correct | 48 ms | 588 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 202 ms | 920 KB | Output is correct |
2 | Correct | 201 ms | 604 KB | Output is correct |
3 | Correct | 257 ms | 608 KB | Output is correct |
4 | Correct | 265 ms | 676 KB | Output is correct |
5 | Correct | 207 ms | 628 KB | Output is correct |
6 | Correct | 186 ms | 656 KB | Output is correct |