Submission #218774

#TimeUsernameProblemLanguageResultExecution timeMemory
218774Lawliet"The Lyuboyn" code (IZhO19_lyuboyn)C++14
11 / 100
585 ms30128 KiB
#include <bits/stdc++.h>

using namespace std;

int n, k, t;

int main()
{
	string s;
	cin >> n >> k >> t >> s;

	vector< string > ans;

	ans.push_back( "0" );
	ans.push_back( "1" );

	for(int i = 2 ; i <= n ; i++)
	{
		vector< string > aux = ans;

		for(int j = 0 ; j < ans.size() ; j++)
			ans[j].push_back( '0' );

		for(int j = 0 ; j < ans.size() ; j++)
			aux[j].push_back( '1' );

		for(int j = aux.size() - 1 ; j >= 0 ; j--)
			ans.push_back( aux[j] );
	}

	cout << ans.size() << endl;

	for(int i = 0 ; i < ans.size() ; i++)
		cout << ans[i] << endl;
}

Compilation message (stderr)

lyuboyn.cpp: In function 'int main()':
lyuboyn.cpp:21:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 0 ; j < ans.size() ; j++)
                   ~~^~~~~~~~~~~~
lyuboyn.cpp:24:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 0 ; j < ans.size() ; j++)
                   ~~^~~~~~~~~~~~
lyuboyn.cpp:33:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0 ; i < ans.size() ; i++)
                  ~~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...