# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
498824 | 2021-12-26T12:12:10 Z | nickmet2004 | "The Lyuboyn" code (IZhO19_lyuboyn) | C++11 | 372 ms | 22756 KB |
#include<bits/stdc++.h> using namespace std; const int N = 2e5 + 5; int n , k , T , M; string s; int vis[N]; vector<int> ans,v; void go(int x){ if(M==0)return; --M; vis[x]=1; ans.emplace_back(x); for(int y : v){ if(!vis[x^y])go(x^y); } } main (){ ios_base::sync_with_stdio(0); cin.tie(0); cin >> n>>k>>T>>s; for(int i= 0; i < (1<<n); ++i){ if(__builtin_popcount(i)==k){ v.emplace_back(i); } } int X= 0; for(int i = 0; i< s.size(); ++i){ if(s[i]=='1')X+=(1<<(s.size()-i-1)); } // for(int x : v)cout <<x<<endl; M = (1<<n); go(X); cout<<(1<<n)<<endl; for(int i = 0; i < ans.size();++i){ for(int j = n-1; ~j; --j)cout << (ans[i]>>j&1);cout<<endl; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Ok |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Ok |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 12 ms | 632 KB | Found solution while it does not exist |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 15 ms | 15752 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Ok |
2 | Correct | 26 ms | 820 KB | Ok |
3 | Correct | 372 ms | 9936 KB | Ok |
4 | Correct | 155 ms | 5080 KB | Ok |
5 | Correct | 1 ms | 336 KB | Ok |
6 | Correct | 5 ms | 464 KB | Ok |
7 | Correct | 68 ms | 2732 KB | Ok |
8 | Correct | 1 ms | 336 KB | Ok |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 17 ms | 22756 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 15 ms | 15752 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 265 ms | 9984 KB | Ok |
2 | Runtime error | 2 ms | 456 KB | Execution killed with signal 11 |
3 | Halted | 0 ms | 0 KB | - |