| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1338542 | rafsanamin2020 | Present (RMI21_present) | C++20 | 433 ms | 147316 KiB |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll MOD = 1E9 + 7, MX = 1E6 + 2;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int T;
cin >> T;
vector<vector<int>> seq;
seq.push_back({0});
for (int i = 1; i <= 25; i++)
{
int ss = seq.size();
seq.push_back({i});
for (int j = 1; j < ss; j++)
{
vector<int> tmp = seq[j];
vector<int> mp(i + 1, 0);
for (int x : tmp)
{
mp[x]++;
}
bool o = true;
for (int x : tmp)
{
int y = __gcd(i, x);
if (mp[y] <= 0)
{
o = false;
}
}
if (o)
{
tmp.push_back(i);
seq.push_back(tmp);
}
}
}
for (int t = 1; t <= T; t++)
{
int k;
cin >> k;
cout << seq[k].size() << " ";
for (int x : seq[k])
{
cout << x << " ";
}
cout << "\n";
}
}| # | 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... | ||||
