| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1339188 | settop | 커다란 상품 (IOI17_prize) | C++20 | 0 ms | 0 KiB |
#include<bits/stdc++.h>
using namespace std;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
#define fall(i,a,b) for(int i=a;i<=b;i++)
#define rfall(i,a,b) for(int i=a;i>=b;i--)
#define pb push_back
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
typedef tuple<int,vector<int>,int> trio;
int rnd(int a,int b){
return a+rand()%(b-a+1);
}
int main(){
srand(time(0));
vector<int> v;
fall(i,1,1) v.pb(1);
fall(i,1,399) v.pb(2);
vector<int> aux(2e5,3);
fall(i,0,399){
int x=rnd(0,2e5);
while(aux[x]!=3) x=rnd(0,2e5);
aux[x]=v[i];
}
fall(i,0,sz(aux)-1) if(aux[i]==1) cout<<i<<"\n";
cout<<sz(aux)<<"\n";
for(auto u:aux) cout<<u<<" ";
cout<<"\n";
}