답안 #83321

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
83321 2018-11-06T23:37:04 Z josiftepe Timovi (COCI18_timovi) C++14
0 / 80
5 ms 2324 KB
#include <iostream>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <sstream>
#include <cstdio>
#include <algorithm>
#include <stack>
#include <queue>
#include <cmath>
#include <iomanip>
#include <fstream>
//#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = (1 << 30);
const ll inf = (1LL << 60LL);
const int maxn = 2e5 + 10;
int n, k, m;
int ret[maxn];
int main(int argc, const char * argv[]) {
    ios_base::sync_with_stdio(false);
    cin >> n >> k >> m;
    int p1 = 2 * n - 1;
    int p2 = p1 * k;
    int coverage = p2 / m;
    int remaining_groups = (m % p2) / k;
    int remaining_children = (m % p2) % k;
    for(int i = 0; i < p1; i ++){
        ret[i] = coverage * k;
    }
    for(int i = 0; i <= remaining_groups; i ++){
        ret[i] += k;
    }
    ret[remaining_groups] += remaining_children;
    cout << ret[0] << " ";
    for(int i = 1; i < n - 1; i ++){
        ret[i] += ret[p1 - i - 1];
        cout << ret[i] << " ";
    }
    cout << ret[n - 1] << endl;
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Incorrect 2 ms 500 KB Output isn't correct
3 Runtime error 4 ms 2104 KB Execution killed with signal 11 (could be triggered by violating memory limits)
4 Runtime error 4 ms 2324 KB Execution killed with signal 11 (could be triggered by violating memory limits)
5 Incorrect 2 ms 2324 KB Output isn't correct
6 Incorrect 3 ms 2324 KB Output isn't correct
7 Runtime error 5 ms 2324 KB Execution killed with signal 11 (could be triggered by violating memory limits)
8 Runtime error 5 ms 2324 KB Execution killed with signal 11 (could be triggered by violating memory limits)