Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*#include <iostream>
- #include <string>
- #include <map>
- using namespace std;
- int main()
- {
- int age, i, n;
- string s;
- map<int, int> a;
- cin >> n;
- for (i = 0; i < n; i++)
- {
- cin >> age;
- a[age]++;
- }
- map<string, int>::iterator iter;
- for (iter = a.begin(); iter != a.end(); iter++)
- cout << iter->first << " " << iter->second << endl;
- system("pause");
- return 0;
- }*/
- #define _USE_MATH_DEFINES
- #include <iostream>
- #include <string>
- #include <map>
- #include <set>
- #include <algorithm>
- #include <vector>
- #include <stdio.h>
- #include <cmath>
- #include <math.h>
- #include <queue>
- #include <stack>
- #include <climits>
- #include <deque>
- #include <ctime>
- using namespace std;
- typedef long long ll;
- typedef unsigned long long ull;
- typedef unsigned int ui;
- #define mh() make_heap()
- #define poph() pop_heap()
- #define pushh() push_heap()
- #define sor(n) n.begin(), n.end()
- #define rsor(n) n.rbegin(), n.rend()
- #define mp make_pair
- #define files freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout)
- #define p(T) pair<T,T>
- #define znac(l) abs(l)/l
- const ll ok = ll(1e9 + 7);
- int main()
- {
- #ifndef ONLINE_JUDGE
- files;
- #endif
- ll b, m, d1, d2;
- cin >> m >> d1 >> d2;
- if ((m * d1) % d2 == 0) {
- b = (m * d1) / d2;
- }
- else {
- b = (m * d1) / d2 + 1;
- }
- ll p = m*d1;
- for (int i = 1; i <= d2; i++)
- {
- cout << b << " ";
- p -= b;
- if(i!=d2)
- if ((p) % (d2-i) == 0) {
- b = (m * d1) / d2;
- }
- else {
- b = (m * d1) / d2 + 1;
- }
- }
- //cout << m*d1-(b*d2-1)+1 << " ";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement