# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
991656 | Abito | Present (RMI21_present) | C++17 | 37 ms | 1480 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define ppb pop_back
#define ep insert
#define endl '\n'
#define elif else if
#define pow pwr
#define sqrt sqrtt
#define int long long
#define y1 YONE
typedef unsigned long long ull;
using namespace std;
vector<vector<int>> S;
bool cmp(vector<int> x,vector<int> y){
for (int i=1;(int)min(x.size(),y.size())-i>=0;i++){
if (x[x.size()-i]!=y[y.size()-i]) return x[x.size()-i]<y[y.size()-i];
}
return x.size()<y.size();
}
int32_t main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
int x=0;
//cout<<(1<<20)<<endl;
for (int i=0;i<(1<<15);i++){
set<int> s;
for (int j=1;j<=15;j++){
if (i&(1<<(j-1))) s.ep(j);
}
bool ok=true;
for (auto u:s) for (auto v:s) ok&=s.count(__gcd(u,v));
if (!ok) continue;
vector<int> v;
for (auto u:s) v.pb(u);
S.pb(v);
}
sort(S.begin(),S.end(),cmp);
int t;cin>>t;
while (t--){
int k;cin>>k;
cout<<S[k].size()<<' ';
for (auto u:S[k]) cout<<u<<' ';cout<<endl;
}
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |