Submission #1314204

#TimeUsernameProblemLanguageResultExecution timeMemory
1314204andrei_nBinary Subsequences (info1cup17_binary)C++20
0 / 100
35 ms4676 KiB
#include <bits/stdc++.h> using namespace std; void testcase() { int k; cin>>k; ++k; int best = 0; for(int i=1; i*i<=k; ++i) { if(k % i == 0) { best = i; } } cout<<"-1\n"; for(int i=1; i<best; ++i) { cout<<"0 "; } for(int i=1; i<k/best; ++i) { cout<<"1 "; } cout<<'\n'; } int main() { ios::sync_with_stdio(false); cin.tie(0); int Z; cin>>Z; while(Z--) { testcase(); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...