| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 780049 | vjudge1 | Timovi (COCI18_timovi) | C++17 | 851 ms | 2896 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;
#define int long long
#define faster ios_base::sync_with_stdio(false);cin.tie(NULL);
#define OYY 1000000005
#define mod 998244353
int dizi[200005];
int32_t main(){
    faster
    int n,k,m;
    cin>>n>>k>>m;
    int t=0,o=0,i=0;
    while(m){
        if(o==0){
            dizi[i]+=min(m,k);
            m-=min(m,k);
            i++;
            if(i==n-1)o=1;
        }
        if(o==1){
            dizi[i]+=min(m,k);
            m-=min(m,k);
            i--;
            if(i==0)o=0;
        }
       // cout<<dizi[i]<<" "<<t<<" "<<o<<endl;
    }
    for(int i=0;i<n;i++)cout<<dizi[i]<<" ";
    return 0;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
