# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
645585 | 2022-09-27T11:29:30 Z | TimDee | Present (RMI21_present) | C++17 | 1179 ms | 391360 KB |
#include <bits/stdc++.h> using namespace std; #define forn(i,n) for (int i=0;i<n;++i) #define prn {cout<<"NO\n";return;} #define pry cout<<"YES\n"; #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") vector<vector<int>> a; void solve() { int k; cin>>k; cout<<a[k].size()<<' '; for (auto x:a[k]) cout<<x<<' '; cout<<'\n'; } int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); a={{},{1},{2},{1,2}}; int mx=3; while (a.size()<=1000000) { vector<vector<int>> b; for (auto x:a) { vector<int> y; int scuza=1; for (auto v:x) { int k=__gcd(v,mx); //cout<<v<<' '<<mx<<' '<<k<<' '; int paiu=0; for (auto u:x) paiu|=u==k; scuza&=paiu; //cout<<paiu<<" "; } y=x; y.push_back(mx); if (scuza) b.push_back(y); } for (auto x:b) a.push_back(x); ++mx; } int t; cin>>t; while (t--) solve(); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1018 ms | 209288 KB | Output is correct |
2 | Correct | 1016 ms | 209264 KB | Output is correct |
3 | Correct | 1008 ms | 209244 KB | Output is correct |
4 | Correct | 1012 ms | 209144 KB | Output is correct |
5 | Correct | 990 ms | 209164 KB | Output is correct |
6 | Correct | 1016 ms | 209240 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1018 ms | 209288 KB | Output is correct |
2 | Correct | 1016 ms | 209264 KB | Output is correct |
3 | Correct | 1008 ms | 209244 KB | Output is correct |
4 | Correct | 1012 ms | 209144 KB | Output is correct |
5 | Correct | 990 ms | 209164 KB | Output is correct |
6 | Correct | 1016 ms | 209240 KB | Output is correct |
7 | Correct | 1014 ms | 209320 KB | Output is correct |
8 | Correct | 1006 ms | 209264 KB | Output is correct |
9 | Correct | 1022 ms | 209104 KB | Output is correct |
10 | Correct | 1004 ms | 209172 KB | Output is correct |
11 | Correct | 1012 ms | 209188 KB | Output is correct |
12 | Correct | 1010 ms | 209208 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1018 ms | 209288 KB | Output is correct |
2 | Correct | 1016 ms | 209264 KB | Output is correct |
3 | Correct | 1008 ms | 209244 KB | Output is correct |
4 | Correct | 1012 ms | 209144 KB | Output is correct |
5 | Correct | 990 ms | 209164 KB | Output is correct |
6 | Correct | 1016 ms | 209240 KB | Output is correct |
7 | Correct | 1014 ms | 209320 KB | Output is correct |
8 | Correct | 1006 ms | 209264 KB | Output is correct |
9 | Correct | 1022 ms | 209104 KB | Output is correct |
10 | Correct | 1004 ms | 209172 KB | Output is correct |
11 | Correct | 1012 ms | 209188 KB | Output is correct |
12 | Correct | 1010 ms | 209208 KB | Output is correct |
13 | Runtime error | 1179 ms | 391360 KB | Execution killed with signal 11 |
14 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1018 ms | 209288 KB | Output is correct |
2 | Correct | 1016 ms | 209264 KB | Output is correct |
3 | Correct | 1008 ms | 209244 KB | Output is correct |
4 | Correct | 1012 ms | 209144 KB | Output is correct |
5 | Correct | 990 ms | 209164 KB | Output is correct |
6 | Correct | 1016 ms | 209240 KB | Output is correct |
7 | Correct | 1014 ms | 209320 KB | Output is correct |
8 | Correct | 1006 ms | 209264 KB | Output is correct |
9 | Correct | 1022 ms | 209104 KB | Output is correct |
10 | Correct | 1004 ms | 209172 KB | Output is correct |
11 | Correct | 1012 ms | 209188 KB | Output is correct |
12 | Correct | 1010 ms | 209208 KB | Output is correct |
13 | Runtime error | 1179 ms | 391360 KB | Execution killed with signal 11 |
14 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1018 ms | 209288 KB | Output is correct |
2 | Correct | 1016 ms | 209264 KB | Output is correct |
3 | Correct | 1008 ms | 209244 KB | Output is correct |
4 | Correct | 1012 ms | 209144 KB | Output is correct |
5 | Correct | 990 ms | 209164 KB | Output is correct |
6 | Correct | 1016 ms | 209240 KB | Output is correct |
7 | Correct | 1014 ms | 209320 KB | Output is correct |
8 | Correct | 1006 ms | 209264 KB | Output is correct |
9 | Correct | 1022 ms | 209104 KB | Output is correct |
10 | Correct | 1004 ms | 209172 KB | Output is correct |
11 | Correct | 1012 ms | 209188 KB | Output is correct |
12 | Correct | 1010 ms | 209208 KB | Output is correct |
13 | Runtime error | 1179 ms | 391360 KB | Execution killed with signal 11 |
14 | Halted | 0 ms | 0 KB | - |