# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
503052 | ismoilov | Beautiful row (IZhO12_beauty) | C++14 | 0 ms | 204 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.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define all(x) (x).begin(), (x).end()
#define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
#define fpp(a,i,c) for(int (a) = (i); (a) <= (c); (a)++)
#define fm(a,i,c) for(int (a) = (i); (a) > (c); (a)--)
#define fmm(a,i,c) for(int (a) = (i); (a) >= (c); (a)--)
string s = "";
void tr(int n){
if(n < 3){
s = to_string(n) + s;
return;
}
s = to_string(n % 3) + s;
tr(n/3);
}
int tr(int n, bool ok){
tr(n);
int sz = 0;
fp(i,0,s.size())
sz += (s[i] == '1');
s = "";
return sz;
}
void S()
{
int n;
cin >> n;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |