# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
645583 | 2022-09-27T11:28:35 Z | TimDee | Present (RMI21_present) | C++17 | 1 ms | 468 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"; 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()<=100) { 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
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 340 KB | Output is correct |
3 | Correct | 1 ms | 328 KB | Output is correct |
4 | Correct | 1 ms | 328 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 340 KB | Output is correct |
3 | Correct | 1 ms | 328 KB | Output is correct |
4 | Correct | 1 ms | 328 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
7 | Runtime error | 1 ms | 468 KB | Execution killed with signal 11 |
8 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 340 KB | Output is correct |
3 | Correct | 1 ms | 328 KB | Output is correct |
4 | Correct | 1 ms | 328 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
7 | Runtime error | 1 ms | 468 KB | Execution killed with signal 11 |
8 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 340 KB | Output is correct |
3 | Correct | 1 ms | 328 KB | Output is correct |
4 | Correct | 1 ms | 328 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
7 | Runtime error | 1 ms | 468 KB | Execution killed with signal 11 |
8 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 340 KB | Output is correct |
3 | Correct | 1 ms | 328 KB | Output is correct |
4 | Correct | 1 ms | 328 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
7 | Runtime error | 1 ms | 468 KB | Execution killed with signal 11 |
8 | Halted | 0 ms | 0 KB | - |