답안 #72462

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
72462 2018-08-26T08:20:42 Z 인프라웨어 상한가 가주세요. 물렸어요(#2188, c4big, cepiloth) 통행이 제한된 저택 (FXCUP3_key) C++14
컴파일 오류
0 ms 0 KB
#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <stack>
#include <math.h>
#include <memory.h>
using namespace std;

#define MAX_SIZE 100
#define InF 0x7fffffff
#define CEnDL "\n"
#define ll long long

int main() {

	cin.tie(0);
	std::ios::sync_with_stdio(false);


	int n; cin >> n; // can area
	int j; cin >> j; // count of jelly;

	int r; cin >> r; // after bunpo
	int second; // time;
	cin >> second;

	vector<int> arr(n);
	for (int i = 0; i < n; i++)
		arr[i] = j;

	while (second--) {
		
		vector<int> brr(n);
		for (int i = 0; i < n-1; i++) {
			int cand = arr[i];
			int remain = ceil((float)cand / r);

			if(arr[i] > 0) 
				arr[i] -= remain;

			brr[i+1] = remain;
		}

		for (int i = 0; i < n - 1; i++) {
			arr[i+1] += brr[i + 1];
		}
	}

	for (int i = 0; i < n; i++) {
		cout << arr[i] << endl;
	}
	return 0;
}

Compilation message

/tmp/ccyzmU84.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccL4ajEx.o:key.cpp:(.text.startup+0x0): first defined here
/tmp/ccyzmU84.o: In function `main':
grader.cpp:(.text.startup+0x13b): undefined reference to `EnsureKeyInfo(int)'
collect2: error: ld returned 1 exit status