# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
862282 | 2023-10-18T01:18:45 Z | fdagdg | Timovi (COCI18_timovi) | C++17 | 2 ms | 352 KB |
#include <bits/stdc++.h> #define ll long long #define FASTER ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define NAME "equa" #define F first #define S second #define mp(_a,_b) make_pair(_a,_b) #define matrix vector<vector<ll>> const int nmax=1e5+7; const int mod=1e7+7; const int oo=1e5+7; using namespace std; typedef pair<int,int> ii; typedef pair<ll,int> li; int n,k,m,ans[2*nmax]; int main() { FASTER freopen(NAME".inp","r",stdin); freopen(NAME".out","w",stdout); cin >> n >> k >> m; int i=0; bool kt=0; while(m){ if(!kt){ ans[i]+=min(m,k); m-=min(m,k); i++; if(i==n-1)kt=1; } if(kt){ ans[i]+=min(m,k); m-=min(m,k); i--; if(i==0)kt=0; } } for(int i=0;i<n;i++)cout<<ans[i]<<" "; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Output isn't correct |
2 | Incorrect | 1 ms | 348 KB | Output isn't correct |
3 | Incorrect | 1 ms | 348 KB | Output isn't correct |
4 | Incorrect | 1 ms | 348 KB | Output isn't correct |
5 | Incorrect | 1 ms | 348 KB | Output isn't correct |
6 | Incorrect | 1 ms | 348 KB | Output isn't correct |
7 | Incorrect | 2 ms | 348 KB | Output isn't correct |
8 | Incorrect | 2 ms | 352 KB | Output isn't correct |