Submission #756017

# Submission time Handle Problem Language Result Execution time Memory
756017 2023-06-10T21:44:07 Z aykhn Sequence (BOI14_sequence) C++14
0 / 100
1 ms 340 KB
#include <bits/stdc++.h>

// author: aykhn

using namespace std;

typedef long long ll;

#define TC int t; cin >> t; while (t--) _();
#define OPT ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define all(v) v.begin(), v.end()
#define pii pair<int, int>
#define mpr make_pair
#define eb emplace_back
#define pb push_back
#define ts to_string
#define fi first
#define se second
#define ins insert
#define int ll
#define inf 0x3F3F3F3F
#define infll 0x3F3F3F3F3F3F3F3FLL
#define bpc __builtin_popcount

bool ok(int val, int x)
{
    if (!val && !x) return true;
    
    while (val)
    {
        if (val % 10 == x) return true;
        val /= 10;
    }
    
    return false;
}
signed main()
{
    OPT;
   /* for (int i = 1; i <= 10; i++)
    {
        for (int j = 1; j <= 10; j++)
        {
            cout << 0 << " ";
        }
        cout << endl;
    }*/
    int n;
    cin >> n;
    
    int x;
    
    for (int i = 0; i < n; i++) cin >> x;
    /*
    
    for (int i = 0; 1; i++)
    {
        bool flag = true;

        for (int j = 0; j < n; j++)
        {
            if (!ok(i + j, x)) flag = false;
        }
        
        if (flag) 
        {
            cout << "ASN: " << i << endl;
            break;
        }
    }*/
    int k = 1;
    while (n / k && n != k) k *= 10;
    
    if (!x) cout << k * 10 << endl; else
    
    cout << x * k << endl;
    
    
    
    
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 340 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -