Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

 
 
 
 
General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
41978470 Practice:
Homeless_Demon
727A - 28 C++17 (GCC 7-32) Wrong answer on test 5 15 ms 16 KB 2018-08-23 00:27:58 2018-08-23 00:27:58
→ Source
#include <cstdint>
#include <string>
#include<bits/stdc++.h>
#include <stdio.h>
#include <stdlib.h>

using namespace std;

void identation(int size_space)
{
    for(int i = 0; i < size_space; i++)
    {
        printf(" ");
    }
}
vector<int> val;
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios_base::sync_with_stdio(0);
    //freopen("input.txt","r",stdin);
    int a, b;
    cin>>a>>b;
    bool flag = 0;
    val.push_back(b);
    while(b>a)
    {
        if(b&1)
        {
            b/=10;
            val.push_back(b);
        }
        else
        {
            b/=2;
            val.push_back(b);
        }
        if(b==a)
            flag = 1;
    }
    if(flag)
    {
        printf("YES\n%d\n",val.size());
        for(int x = val.size()-1 ; ~x;x--)
        {
            printf("%d ", val[x]);
        }
    }
    else
        printf("NO\n");
    return 0;
}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details