# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
780049 | vjudge1 | Timovi (COCI18_timovi) | C++17 | 851 ms | 2896 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |