# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
143824 | nicolaalexandra | Kotrljanje (COCI18_kotrljanje) | C++14 | 1136 ms | 39972 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 <iostream>
#include <vector>
using namespace std;
//ifstream cin ("date.in");
//ofstream cout ("date.out");
int c,d,b,m;
vector <long long> v[1000000];
int main (){
cin>>c>>d>>b>>m;
for (long long nr=0;;nr+=(b-1)){
long long val = 1LL*c*nr+d;
long long aux = val;
int sum = 0;
while (aux){
sum += aux%b;
aux /= b;
}
v[sum].push_back(nr);
if (v[sum].size() == m){
for (int i=0;i<v[sum].size();i++)
cout<<v[sum][i]<<" ";
return 0;
}}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |