# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
383231 | negar_a | Palindrome-Free Numbers (BOI13_numbers) | C++14 | 2 ms | 512 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//!yrt tsuj uoy srettam gnihton no emoc
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
#define mp make_pair
#define pii pair <int, int>
#define fast_io ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define F first
#define S second
ll a, b, ans = 0;
ll x, y;
string A, B;
ll pw(ll x, ll y){
// cout << x << " | " << y << endl;
ll res = 1;
for(ll i = 0; i < y; i ++){
res *= x;
}
return res;
}
void solve_s(ll st){
for(ll i = st - 1; i >= 0; i --){
ll t = 9 - (A[i] - '0') - (i < x - 1 && A[i + 1] > A[i]) - (i < x - 2 && A[i + 2] > A[i] && A[i + 2] != A[i + 1]);
ans += 1LL * t * (i == x - 1 ? 9 * pw(8, i - 1) : pw(8, i));
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |