# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
239769 | VEGAnn | Timovi (COCI18_timovi) | C++14 | 1092 ms | 2168 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define PB push_back
#define sz(x) ((int)x.size())
#define i3 array<int,3>
using namespace std;
typedef long double ld;
typedef long long ll;
const int N = 200100;
const int M = 510;
const int K = 110;
const int T = 2010;
const int oo = 2e9;
int ans[N], n, m, k;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
#ifdef _LOCAL
freopen("in.txt","r",stdin);
#endif // _LOCAL
cin >> n >> k >> m;
int loc = 0, ad = 1;
while (m > 0){
int ost = min(m, k);
ans[loc] += ost;
m -= ost;
if (loc == n - 1 && ad == 1)
ad = -1;
if (loc == 0 & ad == -1)
ad = 1;
loc += ad;
}
for (int i = 0; i < n; i++)
cout << ans[i] << " ";
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |