Submission #42495

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
424952018-02-27 21:23:16iletavcioskiCarnival (CEOI14_carnival)C++14
100 / 100
34 ms2020 KiB
#include <iostream>
#include <vector>
using namespace std;
int main()
{
int n;
cin>>n;
vector<int> v;
v.push_back(1);
vector<int> vkraj(n+1,0);
vkraj[1]=1;
for(int i=2;i<=n;i++)
{
int k=v.size();
cout<<k+1<<endl;
for(int j=0;j<v.size();j++)
{
cout<<v[j]<<endl;
}
cout<<i<<endl;
int b;
cin>>b;
if(b>k)
{
v.push_back(i);
vkraj[i]=v.size();
}
else
{
for(int j=0;j<v.size();j++)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

carnival.cpp: In function 'int main()':
carnival.cpp:16:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j=0;j<v.size();j++)
                ^
carnival.cpp:30:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for(int j=0;j<v.size();j++)
                 ^
#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...